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 after discarded lock results in "Ran apply for 0 projects" #1264

Closed
etherops opened this issue Nov 18, 2020 · 3 comments
Closed
Labels
bug Something isn't working help wanted Good feature for contributors waiting-on-response Waiting for a response from the user

Comments

@etherops
Copy link

Issue Details:

  • atlantis_version = 0.10.2
  • docker image = runatlantis/atlantis:v0.10.2
  • terraform version = 0.11.14
  • VCS = github
  • Configuration:
bash-5.0# env   | grep ATLANTIS  | sort | grep -v "PORT\|HOST\|URL\|GH\|WHITELIST\|SLACK"
ATLANTIS_AUTOMERGE=1
ATLANTIS_CONFIG=/home/atlantis/atlantis.yaml
ATLANTIS_DATA_DIR=/atlantis
ATLANTIS_DEFAULT_TF_VERSION=0.11.14
ATLANTIS_LOG_LEVEL=debug
ATLANTIS_REPO_CONFIG_JSON={"repos":[{"id":"/.*/","apply_requirements":["mergeable","approved"],"workflow":"terraform"}],"workflows":{"terraform":{"apply":{"steps":[{"run":"terraform0.11.14 apply -no-color $PLANFILE && slack_prodchanges"}]}}}}

Summary

When a user discards the lock for a PR va the atlantis UI, atlantis discards the lock and comments as such on the target PR. However, if the users then types in atlantis apply without re-running plan, atlantis will not apply for any projects, but will say it successfully ran the apply for "0" projects. We have automerge on so this is doubly problematic and usually goes unnoticed by the inattentive-to-detail users!

Repro Steps

  • User opens a github PR
  • Atlantis autoplans the project
  • User discards lock via the atlantis UI
  • Atlantis discards the lock with comments: "To apply this plan you must run plan again."
  • User ignores comment and runs atlantis apply in the PR anyways atlantis apply
  • Atlantis applies and appears to have success, but actually silently "fails" in that apply is run for 0 Projects "Ran Apply for 0 projects:"
  • Atlantis automerges the PR since automerge is configured
  • Unattentive user does not notice that the apply was for 0 projects and moves along, believing apply happened when in reality it did not!
  • Subsequent PR to same project reveals hidden, unapplied changes!

Attachments

Below please find a screen shot of an example PR in action.

image

@acastle acastle added bug Something isn't working help wanted Good feature for contributors labels Dec 4, 2020
@jlm0x013
Copy link

I'm interpreting the main error as 'Atlantis applies and appears to have success, but actually silently "fails" in that apply is run for 0 Projects "Ran Apply for 0 projects:"'. That is, if Atlantis fails the merge, then people are aware that there has been an error; and github will not close the associated PR.

@jamengual
Copy link
Contributor

is this still an issue with v0.19.8?

@jamengual jamengual added the waiting-on-response Waiting for a response from the user label Aug 26, 2022
@etherops
Copy link
Author

Hi @jamengual - feel free to close this issue. I am not longer working in the position I was where I reported the issue and am not able to validate/repro at this point. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Good feature for contributors waiting-on-response Waiting for a response from the user
Projects
None yet
Development

No branches or pull requests

4 participants