From 64780539b8a284490f1b99ff1c6d8f39510fd650 Mon Sep 17 00:00:00 2001 From: Milan Dufek Date: Mon, 24 Aug 2026 12:40:45 +0200 Subject: [PATCH] fix(ci): give the manual-merge prod gitops PR its own branch name create-staging-pr and create-manual-merge-prod-pr both depend only on build-helmreleases, so they run concurrently, and both derived branch_name="${repo_name}/${GITHUB_SHA::8}" -- the is_staging branch and the else branch of prepare-pr-metadata were identical. Both jobs then raced to push the same ref into gitops-deployments and the loser failed with "cannot lock ref ...: reference already exists", taking the gate with it. This only fires when a helm chart changes: with charts == '[]', helm-charts-build skips, build-helmreleases skips, and both PR jobs skip on build-helmreleases.result == 'success'. The last change under k8s/charts/ landed in 2021, four years before this pipeline existed, so the pair had never both run until PR #2092 bumped lcm-bricks to 2.0.9 and the gate failed twice in the merge queue. Suffix the manual-merge prod branch with _prod, following the convention the auto-merge variant already uses (_${cluster}_automerge), and say "for all production clusters" in the commit message and PR title so the staging and prod PRs are distinguishable. No consumer matches on the title: revert-staging-pr keys off commit_hash and create-pr-comment off pr_url. JIRA: GRIF-518 --- .github/workflows/create-gitops-deployments-pr.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-gitops-deployments-pr.yaml b/.github/workflows/create-gitops-deployments-pr.yaml index 9efa9a3ac..e4f7cc4be 100644 --- a/.github/workflows/create-gitops-deployments-pr.yaml +++ b/.github/workflows/create-gitops-deployments-pr.yaml @@ -69,9 +69,9 @@ jobs: Change HEAD: https://github.com/${GITHUB_REPOSITORY}/commit/${commit_hash} Workflow run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" else - branch_name="${repo_name}/${commit_hash}" - commit_message="${GITHUB_REPOSITORY}: ${commit_hash}" - pr_title="${GITHUB_REPOSITORY}: ${commit_hash}" + branch_name="${repo_name}/${commit_hash}_prod" + commit_message="${GITHUB_REPOSITORY}: ${commit_hash} for all production clusters" + pr_title="${GITHUB_REPOSITORY}: ${commit_hash} for all production clusters" pr_body=":exclamation: CAREFULLY REVIEW AFFECTED CLUSTER IDs :exclamation: :exclamation: Change is delivered immediatelly to the clusters, including production :exclamation: Change HEAD: https://github.com/${GITHUB_REPOSITORY}/commit/${commit_hash}