You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In
ea37dae
an error was introduced invalidating the production provider build - a
subtle error by moving a `go:embed` directory to wildcards and FS type.
Per https://pkg.go.dev/embed#hdr-Strings_and_Bytes the path to a
go:embed directory is a pattern. Apparently in the case of pulumi-aws CI
the binary is built twice, once for testing and once for production
release. In the for-testing build environment, schema-embed.json is a
file which works as expected. In the for-production build environment,
schema-embed.json is a folder created by the download-artifacts action
that contains a single file. Before the change, this code worked
correctly in both cases:
```
//go:embed schema-embed.json
var pulumiSchema []byte
```
After the change, unfortunately the replacement code worked only for the
for-test build scenario where schema-embed.json is a straight file,
while failing in production.
This change goes back to using the `[]byte` version of go:embed and
makes sure the builds recompute the minimal schema as necessary for both
builds to succeed.
This fixes#4863
We still should address the root cause and refactor the builds to reduce
double-building the provider, so that the exact release build is
qualified by integration tests; which is tracked in
pulumi/ci-mgmt#967
0 commit comments