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

Exclude resource refs from property dependencies for packaged components #488

Merged
merged 3 commits into from
Mar 16, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/bug-fixes-488.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
component: sdk
kind: bug-fixes
body: Exclude resource references from property dependencies for packaged components
time: 2025-03-14T14:41:36.577785-07:00
custom:
PR: "488"
70 changes: 41 additions & 29 deletions pulumi-language-dotnet/language_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"io"
"os"
"os/exec"
"path/filepath"
"sync"
"testing"

Expand Down Expand Up @@ -169,6 +170,44 @@ func runTestingHost(t *testing.T) (string, testingrpc.LanguageTestClient) {
return engineAddress, client
}

// Add test names here that are expected to fail and the reason why they are failing
var expectedFailures = map[string]string{
"l1-builtin-can": "#489 codegen not implemented",
"l1-builtin-try": "#490 codegen not implemented",
"l1-keyword-overlap": "#493 update to pulumi 1.50 conformance failure",
"l2-component-call-simple": "#491 update to pulumi 1.50 conformance failure",
"l2-resource-asset-archive": "" +
"The namespace 'Pulumi.AssetArchive' conflicts with the type 'AssetArchive' in 'Pulumi, Version=1.0.0.0",
"l2-resource-config": "sdk packing for config: build error before pack",
"l2-resource-alpha": "" +
"wrong package reference Include=Pulumi.Alpha.3.0 Version=0-alpha.1.internal",
"l1-output-array": "error CS0826: No best type found for implicitly-typed array",
"l1-output-map": "Same error as with arrays about implicitly typed maps",
"l1-stack-reference": "TODO: call getOutput",
"l2-resource-primitives": "Cannot implicitly convert type 'int[]' to 'Pulumi.InputList<double>'",
"l2-failed-create-continue-on-error": "build error before pack: exit status 1",
"l2-provider-grpc-config": "dotnet build failed",
"l2-provider-grpc-config-secret": "dotnet build failed",
"l2-provider-grpc-config-schema": "dotnet build failed",
"l2-provider-grpc-config-schema-secret": "dotnet build failed",
"l2-invoke-options-depends-on": "dotnet build failed",
"l2-invoke-secrets": "" +
"Pulumi.Deployment+InvokeException: 'simple-invoke:index:secretInvoke' failed: value is not a string",
"l2-map-keys": "dotnet build failed",
"l2-resource-secret": "test hanging",
"l1-builtin-project-root": "#466",
}

// Add program overrides here for programs that can't yet be generated correctly due to programgen bugs.
var programOverrides = map[string]*testingrpc.PrepareLanguageTestsRequest_ProgramOverride{
// TODO[pulumi/pulumi#18741]: Remove when programgen support for call is implemented.
"l2-component-property-deps": {
Paths: []string{
filepath.Join("testdata", "overrides", "l2-component-property-deps"),
},
},
}

func TestLanguage(t *testing.T) {
t.Parallel()
engineAddress, engine := runTestingHost(t)
Expand Down Expand Up @@ -207,42 +246,15 @@ func TestLanguage(t *testing.T) {
Replacement: "ROOT/artifacts",
},
},
ProgramOverrides: programOverrides,
})
require.NoError(t, err)

expectedToFail := map[string]string{
"l1-builtin-can": "#489 codegen not implemented",
"l1-builtin-try": "#490 codegen not implemented",
"l1-keyword-overlap": "#493 update to pulumi 1.50 conformance failure",
"l2-component-call-simple": "#491 update to pulumi 1.50 conformance failure",
"l2-resource-asset-archive": "" +
"The namespace 'Pulumi.AssetArchive' conflicts with the type 'AssetArchive' in 'Pulumi, Version=1.0.0.0",
"l2-resource-config": "sdk packing for config: build error before pack",
"l2-resource-alpha": "" +
"wrong package reference Include=Pulumi.Alpha.3.0 Version=0-alpha.1.internal",
"l1-output-array": "error CS0826: No best type found for implicitly-typed array",
"l1-output-map": "Same error as with arrays about implicitly typed maps",
"l1-stack-reference": "TODO: call getOutput",
"l2-resource-primitives": "Cannot implicitly convert type 'int[]' to 'Pulumi.InputList<double>'",
"l2-failed-create-continue-on-error": "build error before pack: exit status 1",
"l2-provider-grpc-config": "dotnet build failed",
"l2-provider-grpc-config-secret": "dotnet build failed",
"l2-provider-grpc-config-schema": "dotnet build failed",
"l2-provider-grpc-config-schema-secret": "dotnet build failed",
"l2-invoke-options-depends-on": "dotnet build failed",
"l2-invoke-secrets": "" +
"Pulumi.Deployment+InvokeException: 'simple-invoke:index:secretInvoke' failed: value is not a string",
"l2-map-keys": "dotnet build failed",
"l2-resource-secret": "test hanging",
"l1-builtin-project-root": "#466",
"l2-component-property-deps": "https://github.com/pulumi/pulumi/issues/18741: add programgen support for call",
}

for _, tt := range tests.Tests {
tt := tt
t.Run(tt, func(t *testing.T) {
t.Parallel()
if expected, ok := expectedToFail[tt]; ok {
if expected, ok := expectedFailures[tt]; ok {
t.Skipf("test %s is expected to fail: %s", tt, expected)
}

Expand Down
Loading
Loading