Skip to content

0.22.3: Failure to apply Gitlab MR if project is set to "Pipelines must succeed" #3065

@rhysm

Description

@rhysm

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

Since upgrading to 0.22.3 and with the introduction of this change 71738f1 it seems that merge requests in Gitlab cannot be applied if "Pipelines must succeed" is enabled for the project.

Before running apply and with all other CI stages successful the status of the MR from GitLab is:

  "merge_status": "can_be_merged",
  "detailed_merge_status": "mergeable",

Shortly after issuing the apply command the status is updated to:

  "merge_status": "can_be_merged",
  "detailed_merge_status": "ci_still_running",

I think Atlantis own "external" CI job status is being reported as in progress so when Atlantis checks the MR the status is no longer "mergeable" as it expects.

Reproduction Steps

  1. Raise MR in GitLab project with "Pipelines must succeed" enabled
  2. Run atlantis plan
  3. Run atlantis apply
  4. Atlantis should fail to apply here

Logs

Failure running apply operation: Pull request must be mergeable before running apply.

Environment details

Gitlab 15.8
Atlantis 0.22.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions