π€ Generated by the Daily AI Assistant
Problem
The π©Ί Diagnose Flux on failure step β a set +e dump of Flux Kustomizations/HelmReleases/OCIRepositories, controller logs, failing-pod logs and warning events used to debug a stuck reconcile in CI/CD β is copy-pasted across four jobs portfolio-wide, and the copies have already drifted:
| Repo |
File |
Step location |
Notes |
devantler-tech/platform-template |
.github/workflows/ci.yaml |
system-test job, L99 (~77 lines) |
richest copy β dumps logs from any non-Running / CrashLoopBackOff / ImagePullBackOff pod via containerStatuses inspection; --tail=300/300/200 |
devantler-tech/platform-template |
.github/workflows/ci.yaml |
deploy-prod job, L365 (~37 lines) |
lacks the failing-pod log-dump logic; --tail=200/200/100 |
devantler-tech/platform-template |
.github/workflows/cd.yaml |
deploy-prod job, L273 (~35 lines) |
same reduced variant |
devantler-tech/platform |
.github/actions/deploy-prod/action.yml |
L290 |
portfolio-wide confirmation this is a shared pattern, not a one-off |
Because the three platform-template copies are not byte-identical (the system-test copy is ~2Γ longer and carries CrashLoop/pod-log logic the two deploy-prod/cd.yaml copies do not), the prod-deploy failure paths currently emit strictly worse diagnostics than the system-test path β exactly when good diagnostics matter most (a failed real deploy). This is genuine within-repo + cross-repo duplication, not Template-Sync's by-design propagation.
The maintainer already flagged the adjacent extraction in-code (platform-template/.github/workflows/ci.yaml L307β312, re. the cosign signing block): "β¦ideally by extracting cd.yaml's block into a shared composite action so the two paths can never drift again." The same remedy applies to the diagnostics block.
Proposed direction
Add a devantler-tech/actions/diagnose-flux composite action built from the richest (system-test) variant β the union with the CrashLoop/failing-pod log-dump logic β so every consumer inherits the best diagnostics and the copies can never drift again:
- Inputs:
kustomizations (space-separated names to describe on failure; default infrastructure-controllers infrastructure apps), optionally controller-log-tail / pod-log-tail for the --tail values.
- Behaviour: the existing
set +e grouped dump (Kustomizations/HelmReleases/OCIRepositories status + describe, controller logs, all-pods, the containerStatuses-based failing-pod previous+current log dump, warning events).
- Then replace the three
platform-template copies with a single pinned uses: step.
devantler-tech/actions has no diagnose-flux composite today (verified live: existing dirs are aggregate-job-checks, approve-pr, cleanup-ghcr-packages, create-issues-from-todos, dependency-review, enable-auto-merge-on-pr, free-disk-space, login-to-ghcr, run-dotnet-tests, setup-agent-skills, setup-go-toolchain, setup-ksail-cli, sync-github-labels, update-agent-skills, upload-coverage, upsert-issue).
Acceptance criteria
- A
diagnose-flux composite action exists in devantler-tech/actions, documented in its README.md, lint-clean (actionlint), and covers the richest current behaviour.
- All three
platform-template callsites (ci.yaml Γ2, cd.yaml Γ1) consume the pinned composite; no diagnostics behaviour is lost on any path.
platform's deploy-prod action migrating to the composite is captured as a follow-up (that repo is maintainer-hot β separate PR, maintainer-sequenced).
Companion / scope note
The same lines (L307β312) note the cosign signing block in ci.yaml's deploy-prod is also a "faithful copy" of cd.yaml's, with SBOM (syft) + SLSA attestation intentionally not yet mirrored to the merge-queue path. That extraction is a natural companion but carries a maintainer decision (attestation-parity is a deliberate staged rollout) β track separately; this issue is scoped to the diagnostics block only.
Size
M β one new composite (~100 lines, mostly the existing bash) + 3 callsite swaps in platform-template; the platform callsite is a maintainer-sequenced follow-up. Shippable incrementally (composite + README first, then the platform-template migration).
Problem
The
π©Ί Diagnose Flux on failurestep β aset +edump of Flux Kustomizations/HelmReleases/OCIRepositories, controller logs, failing-pod logs and warning events used to debug a stuck reconcile in CI/CD β is copy-pasted across four jobs portfolio-wide, and the copies have already drifted:devantler-tech/platform-template.github/workflows/ci.yamlsystem-testjob, L99 (~77 lines)containerStatusesinspection;--tail=300/300/200devantler-tech/platform-template.github/workflows/ci.yamldeploy-prodjob, L365 (~37 lines)--tail=200/200/100devantler-tech/platform-template.github/workflows/cd.yamldeploy-prodjob, L273 (~35 lines)devantler-tech/platform.github/actions/deploy-prod/action.ymlBecause the three platform-template copies are not byte-identical (the
system-testcopy is ~2Γ longer and carries CrashLoop/pod-log logic the twodeploy-prod/cd.yamlcopies do not), the prod-deploy failure paths currently emit strictly worse diagnostics than the system-test path β exactly when good diagnostics matter most (a failed real deploy). This is genuine within-repo + cross-repo duplication, not Template-Sync's by-design propagation.The maintainer already flagged the adjacent extraction in-code (
platform-template/.github/workflows/ci.yamlL307β312, re. the cosign signing block): "β¦ideally by extracting cd.yaml's block into a shared composite action so the two paths can never drift again." The same remedy applies to the diagnostics block.Proposed direction
Add a
devantler-tech/actions/diagnose-fluxcomposite action built from the richest (system-test) variant β the union with the CrashLoop/failing-pod log-dump logic β so every consumer inherits the best diagnostics and the copies can never drift again:kustomizations(space-separated names todescribeon failure; defaultinfrastructure-controllers infrastructure apps), optionallycontroller-log-tail/pod-log-tailfor the--tailvalues.set +egrouped dump (Kustomizations/HelmReleases/OCIRepositories status +describe, controller logs, all-pods, thecontainerStatuses-based failing-pod previous+current log dump, warning events).platform-templatecopies with a single pinneduses:step.devantler-tech/actionshas nodiagnose-fluxcomposite today (verified live: existing dirs areaggregate-job-checks, approve-pr, cleanup-ghcr-packages, create-issues-from-todos, dependency-review, enable-auto-merge-on-pr, free-disk-space, login-to-ghcr, run-dotnet-tests, setup-agent-skills, setup-go-toolchain, setup-ksail-cli, sync-github-labels, update-agent-skills, upload-coverage, upsert-issue).Acceptance criteria
diagnose-fluxcomposite action exists indevantler-tech/actions, documented in itsREADME.md, lint-clean (actionlint), and covers the richest current behaviour.platform-templatecallsites (ci.yamlΓ2,cd.yamlΓ1) consume the pinned composite; no diagnostics behaviour is lost on any path.platform'sdeploy-prodaction migrating to the composite is captured as a follow-up (that repo is maintainer-hot β separate PR, maintainer-sequenced).Companion / scope note
The same lines (L307β312) note the cosign signing block in
ci.yaml'sdeploy-prodis also a "faithful copy" ofcd.yaml's, with SBOM (syft) + SLSA attestation intentionally not yet mirrored to the merge-queue path. That extraction is a natural companion but carries a maintainer decision (attestation-parity is a deliberate staged rollout) β track separately; this issue is scoped to the diagnostics block only.Size
M β one new composite (~100 lines, mostly the existing bash) + 3 callsite swaps in
platform-template; theplatformcallsite is a maintainer-sequenced follow-up. Shippable incrementally (composite + README first, then the platform-template migration).