Skip to content
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

atlantis/apply check passes before actual apply #1924

Closed
marcbas1 opened this issue Nov 29, 2021 · 3 comments · Fixed by #2053
Closed

atlantis/apply check passes before actual apply #1924

marcbas1 opened this issue Nov 29, 2021 · 3 comments · Fixed by #2053
Labels
bug Something isn't working

Comments

@marcbas1
Copy link

marcbas1 commented Nov 29, 2021

If I open a Pull Request, and I run atlantis plan, the following status checks are posted:

atlantis/plan — 1/1 projects planned successfully. 
atlantis/policy_check — 0/0 projects policies checked successfully. 
atlantis/apply — 0/0 projects applied successfully. 

And the PR is now mergeable because all the status checks are successful.

However, the atlantis apply command has not been posted yet. Ideally the status check should atlantis/apply — 0/1 projects applied successfully. Instead of 0/0.

We're running with the latest version of atlantis. Is this a bug? Any way to prevent the status checks from passing, until the projects have been applied.

Edit:
This was working previously, when a PR was opened atlantis would report:

atlantis/apply Expected — Waiting for status to be reported 

Not sure what recently changed in the latest version.

@AndreZiviani
Copy link
Contributor

AndreZiviani commented Feb 9, 2022

@marcbas1 I implemented what you wanted but theres an issue, if the atlantis/apply status is failing (or pending) the PR is not mergeable.

I wanted to be able to block users from merging the PR without applying via atlantis and limit who can approve it, but looks like this is not possible with current controls, it would require atlantis to ignore its own status when checking if mergeable

@AndreZiviani
Copy link
Contributor

this other issue references something similar #1791

@chenrui333
Copy link
Member

Got released under 0.19.0 today. Thanks @AndreZiviani for the work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants