Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpret schema.Asset as pcl.AssetOrArchive #11593

Merged
merged 1 commit into from Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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