Repository navigation
Say on each run what it does and what it changes; skip applies with nothing to do - #14
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The run page didn't say what a run was going to do. For #12's merge it showed
site-dry-run,site-applyandplatform-applyas 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
changesjob 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:productionrunasked for, and thelimitFor example, #12's merge would have shown:
site.ymlplatform.ymlroles/monitoring/defaults/main.ymlproductionExactly what changes: the summary moved out of
ci-playbook.shintoscripts/ci-summary.py. It lists each loop item that changes, and puts any--diffoutput in a collapsed block per box and task. On #12's real log it now reads:103.232.206.165103.232.206.162On 6719ee6's
site.ymldry run it namesnet.ipv4.ip_local_reserved_portson 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 outputchanges). On a merge,site-applyandplatform-applyrun 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 withrun: applystill always applies, in case a dry run ever misses a change.platform-dry-runalready accepts a skippedsite-apply, soplatform.ymlstill runs after asite.ymlwith nothing to do.scripts/ci-summary.pyjoins 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.ymlandscripts/, 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
actionlintandshellcheckpass.truefor Let sf and sf2 push metrics and logs to the monitoring hub #12's and 6719ee6's dry runs,falsefor Let sf and sf2 push metrics and logs to the monitoring hub #12's log with everychanged=set to 0.ci-summary.pyon Let sf and sf2 push metrics and logs to the monitoring hub #12's and 6719ee6's real dry-run logs (output above).--check --diffplaybook: file and line diffs, a loop item with parentheses, a task name with|, a failing task, and the apply wording.changesstep run locally for a merge (Let sf and sf2 push metrics and logs to the monitoring hub #12's range), this PR, a fork PR and a manual apply with a limit.🤖 Generated with Claude Code