You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Overview of the Issue
If the GitHub/GitLab auto-merge option is triggered for a PR and:
An Atlantis pre-workflow hook is defined for the repo
The pre-workflow hook is running for a plan or apply command
All other PR merge conditions are satisfied (approval, CI checks etc),
Then the PR will be prematurely merged when the pre-workflow hook has finished rather than when the plan/apply pipelines have finished, causing either the plan or apply to fail or for plans from the PR to be left locked.
Reproduction Steps
Define a pre-workflow hook for a repo that takes some time to finish (giving the user chance to set the auto-merge on the PR):
Create a PR and satisfy any required merge conditions (approve, plan, apply etc).
Run a final plan or apply and select auto-merge on the PR whilst the pre-workflow hook is running.
The PR will merge when the pre-workflow hook has finished, and then the plan or apply will fail or leave locked plans.
Environment details
Atlantis version: 0.26.0
Additional Context
This happens because the plan or apply pipeline status is not set to 'pending' until after the pre workflow hooks are complete. This needs changing so that the relevant status is set to pending when the pre workflow hooks start.
The text was updated successfully, but these errors were encountered:
Community Note
Overview of the Issue
If the GitHub/GitLab auto-merge option is triggered for a PR and:
plan
orapply
commandThen the PR will be prematurely merged when the pre-workflow hook has finished rather than when the plan/apply pipelines have finished, causing either the
plan
orapply
to fail or for plans from the PR to be left locked.Reproduction Steps
plan
orapply
and selectauto-merge
on the PR whilst the pre-workflow hook is running.plan
orapply
will fail or leave locked plans.Environment details
Additional Context
This happens because the
plan
orapply
pipeline status is not set to 'pending' until after the pre workflow hooks are complete. This needs changing so that the relevant status is set topending
when the pre workflow hooks start.The text was updated successfully, but these errors were encountered: