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

[panic] Set not supported - is it possible to treat this as immutable? #2585

Closed
ringods opened this issue Nov 4, 2024 · 3 comments · Fixed by #2617
Closed

[panic] Set not supported - is it possible to treat this as immutable? #2585

ringods opened this issue Nov 4, 2024 · 3 comments · Fixed by #2617
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Milestone

Comments

@ringods
Copy link
Member

ringods commented Nov 4, 2024

What happened?

After preparing auto-mapping to my provider codebase, I wanted to remove the manual mappings. On one specific datasource, I got this panic:

$ make provider build_sdks
pulumi/bin/pulumi version: v3.137.0
.pulumi/bin/pulumi plugin install converter terraform 1.0.19
(cd provider && go build  -o /Users/ringods/Projects/pulumiverse/pulumi-cockroach/bin/pulumi-tfgen-cockroach -ldflags "-X github.com/pulumiverse/pulumi-cockroach/provider/pkg/version.Version=0.0.0-alpha.0+dev " github.com/pulumiverse/pulumi-cockroach/provider/cmd/pulumi-tfgen-cockroach)
/Users/ringods/Projects/pulumiverse/pulumi-cockroach/bin/pulumi-tfgen-cockroach schema --out provider/cmd/pulumi-resource-cockroach
panic: Set not supported - is it possible to treat this as immutable?

goroutine 1 [running]:
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/internal/schemashim.(*schemaOnlyDataSourceMap).Set(0x10240ac60?, {0x1400005af90?, 0x1400005b5f0?}, {0x18?, 0x2?})
        /Users/ringods/Projects/golang/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.94.0/pkg/pf/internal/schemashim/datasource_map.go:54 +0x2c
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info.(*Provider).RenameDataSource(0x14000813448, {0x1400005af90, 0x11}, {0x103609447, 0x37}, {0x1400081fa10, 0x25}, {0x103609451, 0x19}, {0x1400081fa1a, ...}, ...)
        /Users/ringods/Projects/golang/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.94.0/pkg/tfbridge/info/rename.go:87 +0x404
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.autoDataSourceSettings.apply({{0x14000a5bb90, 0x1, 0x1}, 0x0}, 0x14000813448, {0x1400005af90, 0x11})
        /Users/ringods/Projects/golang/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.94.0/pkg/tfbridge/auto_aliasing.go:603 +0x138
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*autoSettings).apply(0x1400039f660, 0x14000813448)
        /Users/ringods/Projects/golang/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.94.0/pkg/tfbridge/auto_aliasing.go:565 +0x120
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.ApplyAutoAliases(0x14000813448)
        /Users/ringods/Projects/golang/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.94.0/pkg/tfbridge/auto_aliasing.go:91 +0x2b0
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info.(*Provider).MustApplyAutoAliases(0x14000813448?)
        /Users/ringods/Projects/golang/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.94.0/pkg/tfbridge/info/external_methods.go:39 +0x1c
github.com/pulumiverse/pulumi-cockroach/provider.Provider()
        /Users/ringods/Projects/pulumiverse/pulumi-cockroach/provider/resources.go:236 +0x265c
main.main()
        /Users/ringods/Projects/pulumiverse/pulumi-cockroach/provider/cmd/pulumi-tfgen-cockroach/main.go:10 +0x24
make: *** [tfgen_no_deps] Error 2

Example

Output of pulumi about

CLI          
Version      3.137.0
Go Version   go1.23.2
Go Compiler  gc

Host     
OS       darwin
Version  15.1
Arch     arm64

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@ringods ringods added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Nov 4, 2024
@guineveresaenger guineveresaenger added the p1 A bug severe enough to be the next item assigned to an engineer label Nov 4, 2024
@t0yv0
Copy link
Member

t0yv0 commented Nov 4, 2024

We need to take the #1938 fix and make it also apply to data sources.

#1938 Fix automatic aliasing of muxed providers

@guineveresaenger guineveresaenger removed the needs-triage Needs attention from the triage team label Nov 4, 2024
@mjeffryes mjeffryes added this to the 0.113 milestone Nov 13, 2024
VenelinMartinov added a commit that referenced this issue Nov 14, 2024
This change makes the PF datasources map mutable in order to support
aliases like we do for resources.

The changes here mimic what we did for resources in
#1938

Related to #2585
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Nov 14, 2024
@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #2617 and shipped in release v3.96.0.

@ringods
Copy link
Member Author

ringods commented Nov 22, 2024

@VenelinMartinov provider upgrade ran succesful with the new release:

pulumiverse/pulumi-cockroach#54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants