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