Skip to content

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

@amasover

Description

@amasover

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions