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

Status Checks are not updated on no-op plans #582

Closed
majormoses opened this issue Apr 9, 2019 · 11 comments
Closed

Status Checks are not updated on no-op plans #582

majormoses opened this issue Apr 9, 2019 · 11 comments
Labels
bug Something isn't working

Comments

@majormoses
Copy link
Contributor

So in the following scenario the status checks are not updated properly:

  1. create a change in at least 2 different states, 1 being a functional change another being a no-op such as running terraform fmt
  2. atlantis runs a plan for both states
  3. Running a atlantis apply runs an apply for the one state leaving the webhook status with a 1/2 projects applied successfully.

image

I was wondering if it had discarded the plan file because it is a no-op and discovered that it was either not generated or it was deleted upon discovering it to be a no-op plan.

image

@majormoses
Copy link
Contributor Author

We are on atlantis v0.6.0

@lkysow
Copy link
Member

lkysow commented Apr 10, 2019

Atlantis doesn't treat no-op plans differently from regular plans. So the problem here is that the plan somehow disappeared. Can you post the full output from the plan phase? Also after the plan phase you should be able to see the planfile on disk.

@lkysow
Copy link
Member

lkysow commented Apr 10, 2019

Attempted reproduction shown below.

  1. Create a PR with one real change and one no-op change:
    image
  2. Apply the real change:
    image
  3. Apply the no-op change:
    image

@lkysow lkysow added the question Further information is requested label Apr 10, 2019
@kipkoan
Copy link
Contributor

kipkoan commented Apr 10, 2019

I am seeing something similar.

When Atlantis runs multiple plans in the same PR, it is re-cloning the repo causing the previous plan output to be deleted.

This seems like it may be related to #584

@kipkoan
Copy link
Contributor

kipkoan commented Apr 10, 2019

I confirmed that #585 fixed this problem for me.

@lkysow lkysow added bug Something isn't working and removed question Further information is requested labels Apr 10, 2019
@lkysow
Copy link
Member

lkysow commented Apr 10, 2019

Oh awesome, two birds with one stone!

@majormoses this will only occur if the branch is ahead of master, which triggers the issue fixed by #585. If that change fixes this bug let me know, otherwise we can investigate further.

@majormoses
Copy link
Contributor Author

@lkysow gotcha, I will test it when a new release build is available. Any chance we can get that backported into a 0.6.x release? If not it might be a couple (work) days before I can get around to evaluating an upgrade.

@majormoses
Copy link
Contributor Author

Also its unfortunate that we can't support fast forward merges as it keeps the history much cleaner but I don't want to turn this into a religious war...

@kipkoan
Copy link
Contributor

kipkoan commented Apr 10, 2019

@majormoses - the merge in question is the one done by Atlantis with the checkout-strategy: merge option enabled (not the one that is eventually done to merge the branch back into master; that one can still be fast-forwarded).

@lkysow - I am extremely impressed that you were able to commit the fix for this 28 minutes after I submitted the bug report!

@majormoses
Copy link
Contributor Author

@majormoses - the merge in question is the one done by Atlantis with the checkout-strategy: merge option enabled (not the one that is eventually done to merge the branch back into master; that one can still be fast-forwarded).

Ah gotcha, thanks for the clarification

@lkysow - I am extremely impressed that you were able to commit the fix for this 28 minutes after I submitted the bug report!

what he said

@lkysow
Copy link
Member

lkysow commented Apr 11, 2019

Fixes by #585

@lkysow lkysow closed this as completed Apr 11, 2019
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

No branches or pull requests

3 participants