-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: introduce the --set-atlantis-apply-check-successful-if-no-changes
flag to allow disabling the behavior that automatically sets the atlantis/apply status check to "passing" on a VCS pull request if the atlantis plan command results in "No Changes"
#4332
base: main
Are you sure you want to change the base?
feat: introduce the --set-atlantis-apply-check-successful-if-no-changes
flag to allow disabling the behavior that automatically sets the atlantis/apply status check to "passing" on a VCS pull request if the atlantis plan command results in "No Changes"
#4332
Conversation
…s to allow disabling the behavior that automatically sets the "atlantis/apply" status check to "passing" on a "no changes" plan
@carlosaml Thank you for the PR Carlos. First off, I apologize for the change in behavior, its nor always easy anticipating all use cases. Might I suggest a different approach? In the original discussion, I advocated for adding the funcationlity as another "ApplyRequirement" as
Given the scenario more thought, #3 seems like the ideal long term solution. The only issue here is ApplyRequirements is intended for "requirements before you can apply", not "requiring applies when there are no changes". |
--set-atlantis-apply-check-successful-if-no-changes
flag to allow disabling the behavior that automatically sets the atlantis/apply status check to "passing" on a VCS pull request if the atlantis plan command results in "No Changes".
--set-atlantis-apply-check-successful-if-no-changes
flag to allow disabling the behavior that automatically sets the atlantis/apply status check to "passing" on a VCS pull request if the atlantis plan command results in "No Changes".--set-atlantis-apply-check-successful-if-no-changes
flag to allow disabling the behavior that automatically sets the atlantis/apply status check to "passing" on a VCS pull request if the atlantis plan command results in "No Changes"
@GenPage thanks for the prompt response and suggestions. I'm not sure I completely follow your suggestion, but I'm also not that familiar with the codebase so I might be missing something obvious here. I don't see how an apply requirement for this would be descriptive, since it's certainly not a "requirement before you can apply" but it's also not a planning requirement either.
How do you envision this option being used in a given project configuration, especially assuming this behavior (setting the apply check to "passing" when there are no changes) is the default now and we'd need a way to toggle it off, otherwise it'd be another breaking change. I could see this being a project-level option like Thanks. |
@GenPage did you have a chance to look at my latest comment above? I'm happy to make changes or even open another PR but I'm not sure I understand how option 3 would tackle this issue |
what
Introduce the
--set-atlantis-apply-check-successful-if-no-changes
to allow disabling the behavior that automaticallysets the
atlantis/apply
status check to "passing" on a VCS pull request if theatlantis plan
command results in "No Changes".An initial version of this flag had been implemented as part of #3378 by @chroju but during that (somewhat lengthy) PR's discussion it was decided that this would be the default behavior and no flag would be added, so a breaking change was introduced as part of v0.25.0.
I decided to use the latest name for the flag (
--set-atlantis-apply-check-successful-if-no-changes
) from the original PR (before it was removed), and I also left its default value set to true in order to keep backwards compatibility.why
In our scenario, the motivation for adding this is flag is twofold:
terraform apply
command before any changes are merged to the main branch.terraform apply
step when there's a plan with "No Changes" we are having to manually run anapply
command in order to keep the state file up-to-date.tests
server/events/plan_command_runner_test.go
false
correctly fixes itreferences
This recent comment on #3378 faces the same issue.