Fix OCI cache reconstruction #1076
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the problem/feature ?
Resolves #1060
TL;DR: the cache is not getting systematically reconstructed through scenarios operations.
What contains this PR ?
This PR proposes to change the behavior of
DecodeOCIsuch it downloads the OCI artifact iif the resulting directory does not exist in the cache. This avoids downloading multiple times the OCI artifact throughout reuses of the same reference (e.g., the Kubernetes ExposedMonopod recipe).Further, I systematically reviewed all
iac.LoadStackandiac.NewStackcalls on the basis they are used for instance management (thus uses the OCI artifact). For all these, I made sure there is a call before toscenario.DecodeOCI, thus the cache gets reconstructed.I admit I did not test the cache reconstruction, as I didn't add/change a behavior but added an intermediate step that we know works.
Furthermore, I update the Go dependencies to fix all failing workflows due to various version drifts. The major problem was in Pulumi changes in the config of the
integrationmodule, which seems to no longer work with non-plaintext-strings... something I'll look into more deeply in the upcoming days, maybe after GreHack25.What are the impacts ?
The cache gets reconstructed whenever required, i.e., when there is a scenario operation.