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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atlantis merges the PR even when the "atlantis apply" fails. #4635

Open
snehalsn opened this issue Jun 6, 2024 · 4 comments
Open

Atlantis merges the PR even when the "atlantis apply" fails. #4635

snehalsn opened this issue Jun 6, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@snehalsn
Copy link

snehalsn commented Jun 6, 2024

Community Note

  • 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

We have noticed that there are instances where atlantis goes ahead with merging a PR in the event of an apply error which seems to be a bug in the system. Ideally, when the atlantis apply results in an error, it should not merge the PR.

Screenshot :
Screenshot 2024-06-06 at 2 43 41 PM

Reproduction Steps

  1. Raised the PR
  2. Ran atlantis plan which showed the expected changes.
  3. Ran atlantis apply . This resulted in the Apply Failed error stating "Pull request must be mergeable before running apply."
    It should have stopped at this stage on failure, however, atlantis went ahead and merged the PR.

Environment details

  • Atlantis version: v0.26.0
  • Atlantis flags:
Screenshot 2024-06-06 at 3 09 19 PM

Atlantis server-side config file: We use upstream server-side config

Repo atlantis.yaml file:

 - name: <project_name>
    dir: <directory_path>
    workspace: <workspace_name>
    terraform_version: "1.3.9"
    autoplan:
      when_modified: ["*.tf", "**/*.tf"]
      enabled: true
@snehalsn snehalsn added the bug Something isn't working label Jun 6, 2024
@jamengual
Copy link
Contributor

are the status required for merging? if not then it will not care.

@snehalsn
Copy link
Author

yes... if the apply fails, then the PR should not be merged.

@jamengual
Copy link
Contributor

Which VCS do you use?

@snehalsn
Copy link
Author

Github

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

2 participants