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

Azure DevOps - Atlantis autoplan is triggered again when pull request is approved #946

Closed
amasover opened this issue Mar 13, 2020 · 2 comments
Labels
bug Something isn't working provider/azuredevops

Comments

@amasover
Copy link
Contributor

Whenever there's a new approval on a pull request in ADO, Atlantis autoplan will be triggered, even though there's no new commit:

2020/03/13 18:45:16+0000 [INFO] server: POST /events – from 127.0.0.1:44580
2020/03/13 18:45:16+0000 [INFO] server: POST /events – respond HTTP 200
2020/03/13 18:46:13+0000 [INFO] server: POST /events – from 127.0.0.1:44580
2020/03/13 18:46:13+0000 [INFO] server: Identified event as type "updated"
2020/03/13 18:46:13+0000 [INFO] server: Executing autoplan
2020/03/13 18:46:13+0000 [INFO] server: POST /events – respond HTTP 200
2020/03/13 18:46:14+0000 [INFO] my/repo#145: Successfully parsed atlantis.yaml file
2020/03/13 18:46:14+0000 [INFO] my/repo#145: 1 projects are to be planned based on their when_modified config

This seems unexpected behavior to me. Sometimes the new plan happens when we already have a valid plan, or when somebody approves a PR after the apply has already happened (but before it is merged). If the behavior is intended, then we should maybe have an option to configure it.

It seems I can disable this behavior by setting the webhook to filter change as only "Source Branch Updated". But if I do that, then I think wouldn't be able to turn on "require approvals" in Atlantis?

BTW it looks like there was some somewhat related discussion already on @mcdafydd 's original PR to add Azure DevOps support.

@mcdafydd
Copy link
Contributor

Thanks, @amasover! I have seen this behavior and will dig into it soon.

@lkysow lkysow added provider/azuredevops bug Something isn't working labels Mar 14, 2020
@mcdafydd
Copy link
Contributor

I'll have a bit of time to work on this today.

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

No branches or pull requests

3 participants