Skip to content

Say on each run what it does and what it changes; skip applies with nothing to do - #14

Merged
TakGN merged 2 commits into
mainfrom
ci-run-summary
Oct 22, 2026
Merged

TakGN merged 2 commits into
mainfrom
ci-run-summary

Conversation

@TakGN

@TakGN TakGN commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

The run page didn't say what a run was going to do. For #12's merge it showed site-dry-run, site-apply and platform-apply as skipped with no reason, and the dry run's summary was one row, "lith-1 | Allow 8443/tcp … | 2", without saying what the two changes were.

Changes

"What this run does": the changes job writes a table at the top of the run's summary page. It has one row per playbook: the changed files that make this run touch it, and what happens:

Event This run
pull request Dry run only; nothing from a fork
merge to main Dry run, then, if it would change anything, the apply, once a required reviewer approves it in production
manual What run asked for, and the limit
file not touched Nothing

For example, #12's merge would have shown:

Playbook Changed files it applies This run
site.yml None Nothing
platform.yml roles/monitoring/defaults/main.yml Dry run, then, if it would change anything, the apply, once a required reviewer approves it in production

Exactly what changes: the summary moved out of ci-playbook.sh into scripts/ci-summary.py. It lists each loop item that changes, and puts any --diff output in a collapsed block per box and task. On #12's real log it now reads:

Box Task What
lith-1 ufw_allowlist : Allow 8443/tcp from each source (monitoring ingest) 103.232.206.165
103.232.206.162

On 6719ee6's site.yml dry run it names net.ipv4.ip_local_reserved_ports on each box instead of a count.

The apply writes a summary too, of what it changed, so the run page shows what was done as well as what was planned.

An apply with nothing to do is skipped. Each dry run records whether any box would change (a changed= above 0 in its PLAY RECAP, as the job output changes). On a merge, site-apply and platform-apply run only if their dry run would change something, so nobody is asked to approve an apply that does nothing. The dry run's summary then says "Nothing would change on the boxes, so on a merge the apply is skipped". A manual run with run: apply still always applies, in case a dry run ever misses a change. platform-dry-run already accepts a skipped site-apply, so platform.yml still runs after a site.yml with nothing to do.

scripts/ci-summary.py joins the shared paths, so a change to it gets a dry run that exercises it.

Safety

Tasks with no_log (the Argo CD and Cloudflare secrets) print neither items nor diffs, so the summary shows nothing that isn't already in the job's log. Items are capped at 120 characters and diffs at 200 lines per box and task.

Merging

This touches .github/workflows/ci.yml and scripts/, so merging it dry-runs both playbooks. Both should change nothing, so with this change both applies are skipped and no approval is needed. That is the first real test of the skip. This PR's own run shows the new summaries.

Checked

🤖 Generated with Claude Code

TakGN and others added 2 commits October 22, 2026 13:47
The run page only showed skipped and passed jobs, and the dry run's summary a
count per task: #12's said "2" for the two addresses it allowed, and nothing
said why its apply never ran.

- The changes job writes "What this run does": per playbook, the files that
  made this run touch it, and whether it gets a dry run, an apply after
  approval, or nothing.
- The dry-run summary, now scripts/ci-summary.py, lists each loop item that
  would change (the addresses, the sysctls) and puts --diff output in
  collapsed blocks. The apply writes the same summary of what it did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each dry run now records whether any box would change (changed= above 0 in
the PLAY RECAP), and on a merge the apply runs only if one would, instead of
waiting for an approval that changes nothing. A manual `apply` still always
runs, in case a dry run ever misses a change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TakGN TakGN changed the title Say on each run what it does, and exactly what it changes Say on each run what it does and what it changes; skip applies with nothing to do Oct 22, 2026
@TakGN
TakGN merged commit 06f1eca into main Oct 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant