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

Minimal schema does not work since 6.62.1 #5016

Closed
andrzejressel opened this issue Dec 28, 2024 · 2 comments · Fixed by #5020
Closed

Minimal schema does not work since 6.62.1 #5016

andrzejressel opened this issue Dec 28, 2024 · 2 comments · Fixed by #5020
Assignees
Labels
impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@andrzejressel
Copy link

Describe what happened

Minimal schema (PULUMI_AWS_MINIMAL_SCHEMA) crashes since 6.62.1

Sample program

$ export PULUMI_AWS_MINIMAL_SCHEMA=true
$ pulumi package get-schema [email protected] > /dev/null && echo "Success"
Success
$ pulumi package get-schema [email protected] > /dev/null && echo "Success"
panic: fatal: error An assertion has failed: Failed to open a reader into schema-minimal-embed.json. source error: EOF

goroutine 1 [running]:

github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)

        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/go/common/util/contract/failfast.go:23

github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.AssertNoErrorf({0x1c597b00, 0x2907fd80}, {0x1a54e3fa?, 0xc0002c8180?}, {0x0?, 0x19?, 0x100c00114e326?})

        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/go/common/util/contract/assert.go:51 +0x12b

main.decompressMinimalSchema()

        /home/runner/work/pulumi-aws/pulumi-aws/provider/cmd/pulumi-resource-aws/main.go:43 +0xe5

main.main()

        /home/runner/work/pulumi-aws/pulumi-aws/provider/cmd/pulumi-resource-aws/main.go:55 +0x69

error: could not read plugin [/home/andrzej/.pulumi/plugins/resource-aws-v6.62.1/pulumi-resource-aws] stdout: EOF
$ pulumi package get-schema [email protected] > /dev/null && echo "Success"
panic: fatal: error An assertion has failed: Failed to open a reader into schema-minimal-embed.json. source error: EOF

goroutine 1 [running]:

github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)

        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/go/common/util/contract/failfast.go:23

github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.AssertNoErrorf({0x1cf16bc0, 0x29e35e30}, {0x1ae287c3?, 0xc0002c8180?}, {0x0?, 0x19?, 0x100c001770136?})

        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/go/common/util/contract/assert.go:51 +0x12b

main.decompressMinimalSchema()

        /home/runner/work/pulumi-aws/pulumi-aws/provider/cmd/pulumi-resource-aws/main.go:43 +0xe5

main.main()

        /home/runner/work/pulumi-aws/pulumi-aws/provider/cmd/pulumi-resource-aws/main.go:55 +0x69

error: could not read plugin [/home/andrzej/.pulumi/plugins/resource-aws-v6.66.0/pulumi-resource-aws] stdout: EOF

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

CLI
Version      3.133.0
Go Version   go1.23.1
Go Compiler  gc

Host
OS       ubuntu
Version  24.04
Arch     x86_64
CLI
Version      3.143.0
Go Version   go1.23.4
Go Compiler  gc

Host
OS       Microsoft Windows 11 Pro
Version  10.0.22631 Build 22631
Arch     x86_64

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).

@andrzejressel andrzejressel added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Dec 28, 2024
@t0yv0 t0yv0 self-assigned this Dec 30, 2024
t0yv0 added a commit that referenced this issue Dec 30, 2024
Since v6.62.1 minimal schema was not working. This is now fixed.

A change in standard CI scripts aimed at speeding up makefiles broke the assumptions of pulumi-aws specific Makefile extensions in .mk/minimal_schema.mk - that is CI would now run `make --touch provider schema` which would create an empty provider/cmd/pulumi-resource-aws/schema-minimal-embed.json file instead of recalculating it.

The change in question is: pulumi/ci-mgmt#1157

The fix makes `minimal_schema` a PHONY target that may be a bit less efficient for rebuilding but is no longer affected by `make --touch`.

A regression test is added to catch this problem should it reoccur.

Fixes #5016
@t0yv0 t0yv0 added impact/regression Something that used to work, but is now broken and removed needs-triage Needs attention from the triage team labels Dec 30, 2024
@t0yv0
Copy link
Member

t0yv0 commented Dec 30, 2024

Thanks for spotting @andrzejressel - a fix is coming shortly in #5020

@t0yv0 t0yv0 closed this as completed in 02b1b12 Dec 30, 2024
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Dec 30, 2024
@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #5020 and shipped in release v6.66.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants