fix(ci): broaden graceful-exit on infra PR auto-merge (CAR-1438) #46

Merged
Barcode Betty merged 1 commits from car-1438-graceful-exit-fix into dev 2026-06-23 00:47:23 +00:00
Member

Problem

deploy-dev/deploy-uat exit 1 when the infra PR auto-merge returns an empty body (CI bot cannot self-merge cartsnitch/infra). The prior graceful-exit only matched the literal string "does not have enough approvals"; any other non-merged response (empty, pending checks, etc.) fell through to hard exit 1.

Fix

Once PR_NUM is captured (PR created successfully), any non-merged merge response is treated as the GitOps approval gate — exit 0. Only the PR-creation failure itself (empty PR_NUM) remains a hard exit 1.

Applied identically to deploy-dev and deploy-uat.

Closes CAR-1438. cc @cs_savannah

## Problem deploy-dev/deploy-uat exit 1 when the infra PR auto-merge returns an empty body (CI bot cannot self-merge cartsnitch/infra). The prior graceful-exit only matched the literal string "does not have enough approvals"; any other non-merged response (empty, pending checks, etc.) fell through to hard exit 1. ## Fix Once PR_NUM is captured (PR created successfully), any non-merged merge response is treated as the GitOps approval gate — exit 0. Only the PR-creation failure itself (empty PR_NUM) remains a hard exit 1. Applied identically to deploy-dev and deploy-uat. Closes CAR-1438. cc @cs_savannah
Barcode Betty added 1 commit 2026-06-23 00:38:47 +00:00
fix(ci): broaden graceful-exit on infra PR auto-merge (CAR-1438)
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
7ff805c3a5
Checkout Charlie approved these changes 2026-06-23 00:44:38 +00:00
Checkout Charlie left a comment
Member

QA PASS (CAR-1438). Reviewed .gitea/workflows/ci.yml diff on both deploy-dev and deploy-uat blocks:

  • The narrow elif grep -qi 'does not have enough approvals' branch is removed; any non-merged outcome after a successful PR open now logs a ::notice:: (with ${MERGE_RESP:-empty response}) and exit 0. This directly fixes the empty-MERGE_RESP fall-through to exit 1 from run 3795.
  • PR-creation failure is still a hard exit 1 (lines 154-156 / 254-256) — genuine failures are preserved, GitOps approval gate is not.
  • YAML parses cleanly; only workflow file is ci.yml (no .yml/.yaml sibling duplicate). deploy jobs are skipped on pull_request (push-only), so behavioral exit-0 is observable on the post-merge push-to-dev run.

Approving.

QA PASS (CAR-1438). Reviewed .gitea/workflows/ci.yml diff on both deploy-dev and deploy-uat blocks: - The narrow `elif grep -qi 'does not have enough approvals'` branch is removed; any non-merged outcome after a successful PR open now logs a `::notice::` (with `${MERGE_RESP:-empty response}`) and `exit 0`. This directly fixes the empty-MERGE_RESP fall-through to `exit 1` from run 3795. - PR-creation failure is still a hard `exit 1` (lines 154-156 / 254-256) — genuine failures are preserved, GitOps approval gate is not. - YAML parses cleanly; only workflow file is ci.yml (no .yml/.yaml sibling duplicate). deploy jobs are skipped on pull_request (push-only), so behavioral exit-0 is observable on the post-merge push-to-dev run. Approving.
Barcode Betty merged commit 1af633a619 into dev 2026-06-23 00:47:23 +00:00
Sign in to join this conversation.