-
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
Expected behaviour from --discard-approval-on-plan
flag
#3372
Comments
See references
I defer to the PR author @secustor for more details as I have not used this feature |
What do you use as VCS? |
@nitrocode thanks, @secustor we use github enterprise, it works but I guess only when state changes out of PR. is that correct ? |
another point is I didn't mean it doesn't work, it works but I didn't expect it to work this way. for example if you check scenario 1, I would expect the flag to dismiss that approval but it didn't. in scenario 4 it worked fine what I am trying to understand is what should we expect from this flag, what conditions should be met for this to dismiss approvals ? |
You can go to https://docs.github.com/en/graphql/overview/explorer: {
repository(owner: "secustor", name: "renovate_terraform_lock_in_subdirectory") {
pullRequest(number: 13) {
reviewDecision
reviews(first: 10, states: APPROVED) {
pageInfo {
endCursor
hasNextPage
}
nodes {
id
submittedAt
state
author {
login
}
}
}
}
}
} |
thanks for the information provided, but I didn't really understand how is this going to help me understand what conditions is expected to dismiss an approval. should I come up with different kinds of scenarios and trace each one to see if approvals are considered for dismissal ? wouldn't it be easier to update docs saying something like: "this, this and that condition needs to be met to dismiss a review" ? |
@nitrocode @secustor hello again, can you please let me know if you have any intention to update documentation to make it clear how this flag works ? if you think it is already clear, I will close this ticket not to waste any more time from both sides. thanks in advance |
@serhatcetinkaya Please feel free to propose a pr to make the docs clearer |
As far as I can tell, this isn't documented anywhere at all. |
yes, sadly somehow we all missed the fact that docs where not added. |
Community Note
Overview of the Issue
We started using
--discard-approval-on-plan
flag on our atlantis setup expecting it will discard any approvals before plan is executed. The observed behaviour is different from what we expected.Reproduction Steps
Expected behaviour:
Observed behaviour - scenario 1:
Observed behaviour - scenario 2:
Observed behaviour - scenario 3:
atlantis plan
in the PR to trigger a new planObserved behaviour - scenario 4:
atlantis apply
atlantis plan
in the PR to trigger a new planDismissing reviews because of plan changes
Logs
Logs contain sensitive information I have to redact them first, it will be uploaded if needed. I checked there are no errors or anything related to approval discard.
Environment details
ATLANTIS_DISCARD_APPROVAL_ON_PLAN=true
Additional Context
We are trying to understand what is the expected behaviour for this flag. We were expecting it to discard approvals in scenarios 1,2 & 3. Can you confirm this is the correct behaviour ?
In the code it says:
what is the test criteria to decide if any approval should be removed ?
The text was updated successfully, but these errors were encountered: