You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Atlantis failing to properly detect GitLab Merge Requests (MR) as mergeable, even when they meet the criteria (such as pipeline passed, approvals received, and no conflicts).
Hey @kunal2791! I'm here to help you with your GitLab Merge Requests issue. I can assist with bug fixes, answer your questions, and guide you on how to become a contributor. Let's get this sorted out!
Atlantis might be failing to detect GitLab Merge Requests (MR) as mergeable due to several conditions that need to be met. The PullIsMergeable function in Atlantis checks various criteria, including the status of the pipeline, the merge request's detailed merge status, approvals, blocking discussions, and whether the merge request is a work in progress.
Here is a relevant code snippet from the PullIsMergeable function:
if ((supportsDetailedMergeStatus&&
(mr.DetailedMergeStatus=="mergeable"||mr.DetailedMergeStatus=="ci_still_running"||mr.DetailedMergeStatus=="ci_must_pass"||mr.DetailedMergeStatus=="need_rebase")) ||
(!supportsDetailedMergeStatus&&mr.MergeStatus=="can_be_merged")) &&//nolint:staticcheck // Need to reference deprecated field for backwards compatibilitymr.ApprovalsBeforeMerge<=0&&mr.BlockingDiscussionsResolved&&!mr.WorkInProgress&&
(allowSkippedPipeline||!isPipelineSkipped) {
logger.Debug("Merge request is mergeable")
returntrue, nil
}
logger.Debug("Merge request is not mergeable")
returnfalse, nil
If any of these conditions are not met, the merge request will not be considered mergeable by Atlantis [1].
Additionally, there are similar issues reported by other users:
You might want to verify if the approvals_left field is being checked correctly and ensure that all other conditions in the PullIsMergeable function are met.
Atlantis failing to properly detect GitLab Merge Requests (MR) as mergeable, even when they meet the criteria (such as pipeline passed, approvals received, and no conflicts).
if apply_requirement set to mergeable.
this is config file.
repos:
allowed_overrides: [workflow]
pre_workflow_hooks:
#post_workflow_hooks:
#- run: '[ -f atlantis.yaml ] && { rm atlantis.yaml && echo "File deleted."; } || echo "Not found"'
workflow: terragrunt
delete_source_branch_on_merge: true
apply_requirements: [mergeable]
workflows:
terragrunt:
plan:
steps:
apply:
steps:
The text was updated successfully, but these errors were encountered: