Repository navigation
Conversation
Draftplan no longer needs to hold locks or run policy checks automatically on every push. Instead, policy checks are run on demand against an existing draftplan via a new `atlantis policycheck` comment command, scoped with the usual -d/-w/-p flags. It errors clearly if no draftplan has been run yet for the targeted project. Supporting changes: - Give draftplan its own plan/show/policy-output file naming (.draftplan extension, -draft suffix) so its artifacts never collide with or get overwritten by a real plan's. - Add PendingPlanFinder.FindDraft to discover pending draftplans the same way Find does for real plans. - Add ProjectCommandBuilder.BuildPolicyCheckCommands and DraftPolicyCheckCommandRunner to build and run the new command, reusing the existing policy check execution path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: claudia <claudia.watson@cognite.com>
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.
There were issues running policy checks automatically on each new draftplan, mostly related to speed and complexity.
Instead, trying this:
Add Draft Policy Check command. Instructions:
Using the Draft Policy Check feature
Run a draft plan first (fast, skips remote state refresh):
atlantis draftplan
Targeting a specific project, if needed:
atlantis draftplan -d dir -w workspace
Run the policy check against that draft plan:
atlantis draft_policy_check
Targeting a specific project, if needed:
atlantis draft_policy_check -d dir -w workspace
Requirements / behavior: