Skip to content

5.45.5: readable quick-status and traffic-report, current scripts on rebuild - #289

Merged
jasperf merged 2 commits into
mainfrom
fix/quick-status-output
Nov 14, 2026
Merged

jasperf merged 2 commits into
mainfrom
fix/quick-status-output

Conversation

@jasperf

@jasperf jasperf commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two fixes in one release, 5.45.5.

1. quick-status and traffic-report print a plain report

Both playbooks passed Ansible a list (msg: [...], stdout_lines). Ansible prints each list item as its own entry, so the report came out as - 'text' lines with a - '' for every blank line.

  • trellis/monitoring/quick-status.yml: one multi-line msg: | string. A nl variable supplies a real newline for join, because '\n' inside a block scalar stays two characters.
  • trellis/monitoring/traffic-report.yml: print stdout instead of stdout_lines.
  • quick-status now shows the newest five client-error and login-attempt lines ([-5:]), not the oldest five of the last ten.

2. A local rebuild runs its own scripts

A binary with no checkout beside it extracts its embedded scripts to assets-<version> in the cache, and the version is the top CHANGELOG heading. Two builds of one working tree share it, so after editing a playbook and rebuilding, the new binary kept running the first build's copy.

  • go/cmd/env.go: the directory is now assets-<version>-<hash>, where the hash covers every embedded file's path and contents. The old-extraction sweep matches on the assets- prefix, so it keeps working.
  • Release installs are unaffected.

Testing

  • Ran quick-status and traffic-report against a production site; the output is plain text blocks.
  • go test ./... passes, including new tests that the hash changes on an edit or a rename and ignores declaration order, and that the extraction directory carries the version and the hash.
  • Merged main into the branch; the only conflict was the CHANGELOG entry order (5.45.5 above 5.45.4).

Both playbooks gave Ansible a list of lines, which it prints as one quoted
'- ...' item per line. Print a single multi-line string instead, which the
YAML result format shows as a readable block. quick-status joins with a
real newline variable, since a backslash-n inside a block scalar stays two
characters. It also shows the newest five client-error and login lines
rather than the oldest five of the last ten.
@jasperf
jasperf merged commit 8bc5eb2 into main Nov 14, 2026
2 checks passed
@jasperf
jasperf deleted the fix/quick-status-output branch November 14, 2026 22:40
@jasperf jasperf changed the title 5.45.5: print quick-status and traffic-report as a plain report 5.45.5: readable quick-status and traffic-report, current scripts on rebuild Nov 14, 2026
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