Skip to content

Commit 91545a9

Browse files
Upgrade (#2842)
Fixes #2839 The `Migrate.VmUptimeArgs` type is incompatible between 2019-10-01 and 2023-03-15 as the property `HoursPerDay` changed from a number to an integer, which is a breaking change. To avoid this, we exclude pulling the new `AssessmentOperation` resource into the default version. To investigate the issue, I edited the flow so we still return and output the calculated versions on a failure so we can see what new resources are being added at what version.
1 parent 9319fc0 commit 91545a9

File tree

3,477 files changed

+368941
-23223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,477 files changed

+368941
-23223
lines changed

azure-rest-api-specs

provider/cmd/pulumi-gen-azure-native/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,7 @@ func main() {
7676

7777
switch languages {
7878
case "schema":
79-
buildSchemaResult, err := versioning.BuildSchema(buildSchemaArgs)
80-
if err != nil {
81-
panic(err)
82-
}
79+
buildSchemaResult, buildSchemaErr := versioning.BuildSchema(buildSchemaArgs)
8380

8481
if namespaces == "*" && apiVersions == "" {
8582
written, err := buildSchemaResult.Version.WriteTo("versions")
@@ -99,6 +96,9 @@ func main() {
9996
} else {
10097
fmt.Println("Note: skipping writing version metadata and reports because DEBUG_CODEGEN_NAMESPACES or DEBUG_CODEGEN_APIVERSIONS is set.")
10198
}
99+
if buildSchemaErr != nil {
100+
panic(buildSchemaErr)
101+
}
102102
if codegenSchemaOutputPath == "" {
103103
codegenSchemaOutputPath = path.Join("bin", "schema-full.json")
104104
}

provider/pkg/versioning/build_schema.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ func BuildSchema(args BuildSchemaArgs) (*BuildSchemaResult, error) {
100100

101101
generationResult, err := gen.PulumiSchema(args.RootDir, providers, versionMetadata)
102102
if err != nil {
103-
return nil, err
103+
return &BuildSchemaResult{
104+
PackageSpec: schema.PackageSpec{},
105+
Metadata: resources.AzureAPIMetadata{},
106+
Version: versionMetadata,
107+
Reports: BuildSchemaReports{},
108+
}, err
104109
}
105110

106111
pkgSpec := generationResult.Schema

0 commit comments

Comments
 (0)