Skip to content

ci: migrate deploy-prod Flux diagnostics to shared diagnose-flux composite#2317

Merged
devantler merged 1 commit into
mainfrom
claude/ci-diagnose-flux-composite
Jun 28, 2026
Merged

ci: migrate deploy-prod Flux diagnostics to shared diagnose-flux composite#2317
devantler merged 1 commit into
mainfrom
claude/ci-diagnose-flux-composite

Conversation

@devantler

@devantler devantler commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

🤖 Generated by the Daily AI Assistant

What

Replace the inline 🩺 Diagnose Flux on failure step in .github/actions/deploy-prod/action.yml (the prod-deploy reconcile failure path) with the shared composite devantler-tech/actions/diagnose-flux@e182f2207fb386ef827f48b3cc9b7deac873046a # v7.1.0.

This is the fourth and final callsite of the Diagnose Flux on failure block that devantler-tech/actions#367 set out to consolidate. The three platform-template copies were already migrated in platform-template#46 (merged 2026-06-27); this PR completes the sweep.

Why it is safe

  • Failure-path-only diagnostics. The step is gated if: failure() && steps.reconcile.outcome == 'failure' and only dumps Flux/cluster state with set +e. It cannot influence a successful deploy — the only observable change is which diagnostics print when a deploy has already failed.
  • Behaviour-preserving for the describe loop. The composite's kustomizations input defaults to infrastructure-controllers infrastructure apps — byte-identical to the list this callsite previously hard-coded — so no with: override is needed.
  • Strict diagnostics upgrade otherwise. The composite (extracted from platform-template's richest variant) additionally dumps Nodes, all pods, failing/CrashLooping pod logs (current + previous), Job pod logs, and failing-Job describes, with larger --tail values (300/300/200/80/100 vs the old 200/200/100/60/50) — exactly when good diagnostics matter most, on a failed real prod deploy.
  • Pin parity. Pinned to the same SHA (e182f22…, v7.1.0) the platform-template callsites use, keeping all four byte-consistent — the whole point of Setup Grafana #367.

Validation

  • yq parse of the edited action.yml confirms the step is a well-formed composite uses: step (name/if/uses only; no stray run/shell/env).
  • diagnose-flux is unchanged between v7.1.0 and v7.1.1, so the pin is current.
  • Net diff: −35 / +8 lines, single file.

Fixes devantler-tech/actions#367

Summary by CodeRabbit

  • Bug Fixes
    • Improved deployment failure diagnostics, making it easier to troubleshoot Flux-related issues when a deploy does not succeed.
    • Kept the existing failure-only behavior intact, so normal successful deployments are unchanged.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 456a2a84-2a29-407c-b6d6-237b668b238d

📥 Commits

Reviewing files that changed from the base of the PR and between 0d4f7ba and 1e2cb08.

📒 Files selected for processing (1)
  • .github/actions/deploy-prod/action.yml

📝 Walkthrough

Walkthrough

The inline Bash diagnostic step in .github/actions/deploy-prod/action.yml that ran kubectl commands on failure is replaced with a call to the shared devantler-tech/actions/diagnose-flux composite action pinned to commit v7.1.0.

Flux Diagnostics Extraction

Layer / File(s) Summary
Replace inline diagnostics with composite action
.github/actions/deploy-prod/action.yml
The 🩺 Diagnose Flux on failure step's 35-line inline Bash block (kubectl describe, controller logs, warning events) is replaced with a uses: devantler-tech/actions/diagnose-flux call pinned to a v7.1.0 commit; default kustomizations input preserves the prior hard-coded list.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

Poem

🐇 Hoppity-hop, the scripts are gone,
A composite action carries on!
No more copy-pasted bash in sight,
One shared step makes the deploys right.
The rabbit tidied up the mess —
Shared actions FTW, no more stress! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning This PR only updates one platform callsite; it does not create the composite or migrate the three platform-template callsites required by #367. Add the diagnose-flux composite in devantler-tech/actions, migrate the platform-template callsites, and keep any platform repo update as a separate follow-up.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes migrating deploy-prod Flux diagnostics to the shared composite.
Out of Scope Changes check ✅ Passed The change appears limited to swapping the failure-diagnostics step for the shared composite, with no unrelated code paths added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/ci-diagnose-flux-composite

Comment @coderabbitai help to get the list of available commands.

@devantler devantler marked this pull request as ready for review June 28, 2026 06:15
@devantler devantler added this pull request to the merge queue Jun 28, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jun 28, 2026
@devantler devantler added this pull request to the merge queue Jun 28, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jun 28, 2026
@devantler devantler added this pull request to the merge queue Jun 28, 2026
@devantler devantler removed this pull request from the merge queue due to a manual request Jun 28, 2026
@devantler devantler merged commit 2e78edc into main Jun 28, 2026
14 checks passed
@devantler devantler deleted the claude/ci-diagnose-flux-composite branch June 28, 2026 11:52
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Jun 28, 2026
@botantler-1

botantler-1 Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.84.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

feat(diagnose-flux): extract the duplicated Flux failure-diagnostics block into a shared composite action

1 participant