Repository navigation
fix(infra): don't fail the main plan while an apply is pending - #21
Merged
Merged
Conversation
Merging infra changes and then running Infra apply is the normal flow, so the plan on the merge commit is always non-empty until the apply runs. Report it as a notice with the plan in the job summary instead of failing. Plan errors still fail, and the weekly drift check still opens an issue. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013n1oPa64gxZ6ELaFaMeo3X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Before: merging a PR that adds infra made the "Infra plan" run on main fail, because the push step exited 1 on any non-empty plan. The normal flow is merge, then run Infra apply, so every infra merge was red until the apply ran.
After: a non-empty plan on a main push is reported as a notice, with the plan in the job summary, and the run passes. A plan that errors still fails. The weekly drift check still opens an issue if changes stay unapplied, and Infra apply still verifies that the plan is empty afterwards.
How: the "Enforce converged state" step is replaced by a step that branches on the plan exit code (0 matches, 2 pending, anything else fails).
🤖 Generated with Claude Code
Generated by Claude Code