Skip to content

Commit

Permalink
Interpret schema.Asset as pcl.AssetOrArchive
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Dec 8, 2022
1 parent 833c85a commit 8e99749
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
@@ -0,0 +1,4 @@
changes:
- type: fix
scope: programgen
description: Interpret schema.Asset as pcl.AssetOrArchive.
6 changes: 5 additions & 1 deletion pkg/codegen/pcl/binder_schema.go
Expand Up @@ -389,7 +389,11 @@ func (b *binder) schemaTypeToType(src schema.Type) model.Type {
case schema.ArchiveType:
return ArchiveType
case schema.AssetType:
return AssetType
// Generated SDK code accepts assets or archives when schema.AssetType is
// specified. In an effort to keep PCL type checking in sync with our
// generated SDKs, we match the SDKs behavior when translating schema types to
// PCL types.
return AssetOrArchiveType
case schema.JSONType:
fallthrough
case schema.AnyType:
Expand Down
1 change: 0 additions & 1 deletion pkg/codegen/testing/test/program_driver.go
Expand Up @@ -249,7 +249,6 @@ var PulumiPulumiYAMLProgramTests = []ProgramTest{
Directory: transpiled("azure-app-service"),
Description: "Azure App Service",
Skip: codegen.NewStringSet("go", "dotnet"),
BindOptions: []pcl.BindOption{pcl.SkipResourceTypechecking},
},
{
Directory: transpiled("azure-container-apps"),
Expand Down

0 comments on commit 8e99749

Please sign in to comment.