From 7f405ccc67bfbd6e145b73500379e3fd6619e7c6 Mon Sep 17 00:00:00 2001 From: Flea Flicker Date: Fri, 10 Apr 2026 06:07:22 +0000 Subject: [PATCH] fix: remove dead kubectl delete step from promote-to-uat workflow The CTO correctly identified that the delete step was dead code: - gcloud/kubectl silently fail in the runner (no GKE credentials) - Architecturally wrong for GitOps (Flux handles reconciliation) - Unique Job names + ttlSecondsAfterFinished handle lifecycle Co-Authored-By: Paperclip --- .github/workflows/promote-to-uat.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/promote-to-uat.yml b/.github/workflows/promote-to-uat.yml index a38d6a7..6aed17e 100644 --- a/.github/workflows/promote-to-uat.yml +++ b/.github/workflows/promote-to-uat.yml @@ -72,25 +72,6 @@ jobs: git -C /tmp/infra diff --stat - - name: Delete existing seed Job in UAT (immutable Job fix) - env: - TAG: ${{ inputs.image_tag }} - GH_TOKEN: ${{ steps.infra-token.outputs.token }} - run: | - cd /tmp/infra - SHORT_SHA="${TAG##*-}" - SEED_JOB_NAME="seed-test-data-${SHORT_SHA}" - - echo "Deleting existing seed Job: ${SEED_JOB_NAME} in groombook-uat namespace" - - gcloud container clusters get-credentials groombook-uat --zone us-central1 --project groombook-424212 2>/dev/null || \ - kubectl config view --minify --raw 2>/dev/null || true - - kubectl delete job/${SEED_JOB_NAME} -n groombook-uat --ignore-not-found=true 2>/dev/null || \ - echo "Direct kubectl delete skipped (GitOps-only). Flux will reconcile after PR merge." - - echo "Job deletion complete. Flux will reconcile the new manifest after PR merge." - - name: Create PR on groombook/infra env: TAG: ${{ inputs.image_tag }}