feat: replan between execution order groups during apply - #6766
Open
marcosaranda-appspace wants to merge 1 commit into
Open
Conversation
marcosaranda-appspace
force-pushed
the
feat/replan-between-execution-order-groups
branch
2 times, most recently
from
August 13, 2026 16:59
d874f2c to
7507031
Compare
Add an opt-in repo setting so Atlantis can refresh later planfiles after earlier execution order groups apply. This unblocks Terragrunt stacks that plan dependents with mock_outputs and otherwise apply a stale plan (runatlantis#2243). The feature is off by default and is designed to leave existing flows alone: - Mid-apply replan reuses the pull working tree and skips Clone/MergeAgain so sibling planfiles stay intact. - Mid-apply replan suppresses VCS and job status noise, and its plan and policy_check output does not enter apply results, PR comments, or the apply DB status. - With the setting enabled, a failed group stops later groups instead of refreshing against incomplete dependencies. - Historical abort_on_execution_order_fail behavior is unchanged when the setting is off. Assisted-by: Cursor <noreply@cursor.com> Signed-off-by: marcos.aranda <marcos.aranda@appspace.com>
marcosaranda-appspace
force-pushed
the
feat/replan-between-execution-order-groups
branch
from
August 13, 2026 17:18
7507031 to
f51960b
Compare
Contributor
|
Hi @marcosaranda-appspace -- Thanks for the submission here. I think something along these lines is needed. But, I'd like to ensure that the ultimate approach aligns with the long-term goals of the project. Some things that comes to mind is whether to surface the plan delta on re-plan, or if automatically applying the refreshed plan, if there should be any criteria which toggles proceed with auto-apply vs bail and show the plan. I'll try to find some time to look over this. |
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.
what
Adds an opt-in repo-level setting:
When enabled, a broad
atlantis applywill:execution_order_groups with the reviewed planfilespolicy_checkwhen configured) for later groupsDefault remains
false, so existing plan-then-apply review semantics are unchanged.why
Fixes #2243. Terragrunt (and similar) stacks plan dependents with
mock_outputswhile their parents do not exist yet. Atlantis then applies the stale mock planfile for the child after the parent apply.depends_onandexecution_order_grouponly order work; they do not refresh planfiles.Related: #6106, #6558 (pausing between groups is complementary, not a substitute).
safety and compatibility
MidApplyReplan, reuseGetWorkingDir, and skipClone/MergeAgain, so sibling planfiles in the pull workspace are never wiped or invalidated. Plan-stage PR requirements are also skipped, since apply requirements already ran andMergeAgainis intentionally not performed.SuppressVCSStatusandSuppressJobOutput, so project commit statuses do not flip to plan mid-apply.ProjectResults, so apply PR comments and the apply DB status stay clean.abort_on_execution_order_failbehavior is byte-for-byte the previous behavior, including the shared plan command path.execution_order_groupvalues are recommended. If every project shares group0withparallel_apply: true, Atlantis still runs a single wave and cannot replan between projects.tests
GetWorkingDir, neverClone/MergeAgain, and skips plan-requirement revalidation.ghcr.io/runatlantis/testing-env:latest(make test-all && make check-fmt), includingserver/controllers/events.markdownlint-cli2clean acrossrunatlantis.io/**/*.md, andgo vetclean on the touched packages.notes for reviewers
depends_on.