Do not diff __internal property in DiffConfig (#414)

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
This commit is contained in:
Ramon Quitales
2025-01-14 15:01:51 -08:00
committed by GitHub
parent 8025c5f938
commit d46882f9eb
9 changed files with 214 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
### Fixed
- Custom `# syntax=` directives no longer cause validation errors. (https://github.com/pulumi/pulumi-docker-build/issues/300)
- Upgrading docker-build no longer causes resource replacements. (https://github.com/pulumi/pulumi-docker-build/issues/404)
## 0.0.7 (2024-10-16)