Automatically accept SDK changes for Renovate PRs #1248
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.
We have a problem right now where automated dependency upgrades can change our generated code, and this causes tests to fail because we expect no changes in CI.
The "right" way to do this is with a hermetic
make renovate
step which can re-generate this code during the Renovate job, as @t0yv0 has started doing for EKS (e.g. pulumi/pulumi-eks#1552). But we don't have hermetic builds so we don't yet have an easy way to get this to work across all providers.This PR implements a suggestion from Daniel to help address the long tail. Essentially right before we fail a build for containing SDK changes, we will commit those changes and push them back to the PR -- but only if it came from Renovate. The build will still fail, but tests will be re-tried against the updated SDK.
Renovate has already been configured to "ignore" updates from pulumi-bot (https://github.com/pulumi/renovate-config/commit/82931a62d50a9b7a628032bdefbf3c6f64a4e895), so if tests pass it will still automatically squash and merge.
Here's an example where I manually modified the SDK and the PR was automatically corrected:
Refs #1101
Refs #936