`buildx.Build` doesn't terminate if context is canceled, so this PR
rearranges things such that we can wait for the build or context to
finish.
Fixes#533.
**Description:**
This PR updates the `moby/buildkit` dependency to `v0.20.1` in order to
remain compatible with recent changes required by GitHub Actions (GHA)
caching.
During the upgrade, several upstream behavioral changes required forking
and restoring legacy logic to maintain compatibility:
- Introduced `containsGithubToken` to replicate logic that was
previously in `buildflags.ParseCacheEntry`, which is now removed. This
check ensures we return `nil` instead of a zero-value object.
- Forked the previous implementation of `ParseExports`, as its upstream
logic changed significantly. This ensures short-term compatibility for
release before the GHA deprecation deadline.
- A follow-up issue will be created to improve this forked logic and
align more closely with upstream behavior.
🚨 **Fixes critical issue:**
This change addresses a high-priority issue where GitHub Actions cache
will stop working due to the upcoming deprecation of the legacy caching
service (effective **April 15, 2025**).
Recent build failures showed errors like:
> *"This legacy service is shutting down, effective April 15, 2025.
Migrate to the new service ASAP. For more information:
https://gh.io/gha-cache-sunset"*
Root cause was identified in #515, where using `buildx >= 0.21.0` is
required.
This repo was previously using `buildx 0.18.0`.
Closes: #515
Closes#482
I traced the problem to where buildx parses the cli args
([here](fa4461b9a1/util/buildflags/cache.go (L14))),
and confirmed it applies defaults based on GHA environment variables and
ignores the cacheTo/cacheFrom directive altogether when the variables
aren't available.
The fix is to ignore the GHA cache directive when it the upstream parser
ignores it.
This PR was automatically generated by the
update-native-provider-workflows workflow in the pulumi/ci-mgmt repo,
from commit ea6479fcbca4b3b86182ffdd8731b26746795508.
---------
Co-authored-by: Eron Wright <eronwright@gmail.com>
Co-authored-by: Eron Wright <eron@pulumi.com>
This PR updates the implementation of DiffConfig to remove the
`__internal` property when comparing provider config between old state
and new input. It is observed that the `__internal` property is present
when a default provider is used. This causes a provider replacement
every time a user upgrades pulumi-docker-build, as the `__internal`
property is always stripped from state, so Pulumi will always report a
diff.
Ideally, we should determine if this bug can be fixed in either upstream
pulumi-go-provider or pulumi itself. For now, we will fix this locally
within pulumi-docker-build to unblock our users.
Changes:
- Update DiffConfig implementation to strip `__internal` property from
new inputs.
- Add a nodejs upgrade test to test that this solution works
Fixes: #404
The provider currently attempts to parse your Dockerfile in case there
are any obviously broken syntax errors.
However, Dockerfiles can use custom syntaxes which are implemented as
their own images. Buildkit detects `# syntax=` directives, pulls the
image, and uses it to parse.
It doesn't make sense for us to attempt to replicate that behavior, so
when we detect a custom syntax we will simply disable this validation.
If there are syntax errors the user will discover them after the build
is attempted.
Fixes https://github.com/pulumi/pulumi-docker-build/issues/300
The `Image` resource already ignores errors during read but the `Index`
resource was requiring the inspect call to always succeed. This will often
fail due to https://github.com/pulumi/pulumi/issues/4981 (note however in
this case credentials are stored with the resource instead of the provider).
This changes our logic to instead emit a warning if the credentials are
invalid.
Fixes https://github.com/pulumi/pulumi-docker-build/issues/121.
This upgrades pulumi to v3.121.0 and bumps several other first-party dependencies.
Note that vendored language plugins must be bumped manually because their go modules are currently untagged:
* go get github.com/pulumi/pulumi/sdk/python/cmd/pulumi-language-python/v3@79e814fe0f2137ade87ee5af384e6cb71e4aa6ff
* go get github.com/pulumi/pulumi/sdk/nodejs/cmd/pulumi-language-nodejs/v3@79e814fe0f2137ade87ee5af384e6cb71e4aa6ff
* go get github.com/pulumi/pulumi/sdk/go/pulumi-language-go/v3@79e814fe0f2137ade87ee5af384e6cb71e4aa6ff
* go get github.com/pulumi/pulumi-dotnet/pulumi-language-dotnet@fa777213effdc3a80bb893194d63cd8b7ca7a868
* go get github.com/pulumi/pulumi-yaml@15eb402
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bryce Lampe <bryce@pulumi.com>
I could have sworn the context property was required, but evidently it
isn't and we weren't handling the case when it was missing.
This PR updates things to set a default location of the current
directory if the context is absent. Some unit tests are also added.
Fixes#78.
Part of https://github.com/pulumi/ci-mgmt/issues/915
Install pulumi in standard way
Use the same method as other providers to install the pulumi CLI.
- Lock the version of the CLI and therefore codegen for consistent build
results.
- Ensure the local language plugins are using by disabling ambient
plugins.
Enable respect schema version
Remove setting version at SDK build time
---------
Co-authored-by: Bryce Lampe <bryce@pulumi.com>
* Rename the provider to dockerbuild.
* Add Makefile targets required by CI.
* Add per-language test targets compatible with CI.
* Fix broken example yaml.
* Add gitignore exclusions to fix SDK generation in CI.
* Fix lint errors.
* Vendor pulumi CLI via `tools.go` instead of `.pulumi`.
* Consolidate `go.mod`s into one file, with a minimal `go.mod` for the
Go SDK.
* Add codecov.