Commit Graph
21 Commits
Author SHA1 Message Date
valknarandClaude Sonnet 5 8e783f894d fix(stacks): widen pull retry window and jitter the nightly update timer
Nightly update pulls for coolify/immich kept hitting transient ghcr.io
toomanyrequests errors and getting skipped, because the timer fired at
exactly 02:00:00 Europe/Amsterdam (the same instant countless other
hosts' cron/timer jobs also hit registries) and the retry loop only
spanned ~15s (3 attempts, 5/10/15s backoff) — not enough to ride out
the burst.

- Widen pull retries to 5 attempts with 20/40/60/80s backoff (~3+ min).
- Add RandomizedDelaySec=1800 to the update timer (and its install
  template) so this host's pulls no longer land on the exact
  top-of-hour thundering herd.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XmtksEEYSBZqUacw3qF1A9
2026-09-12 15:45:12 +00:00
valknarandClaude Sonnet 5 030e27b13b fix(stacks): make nightly update check resilient to transient errors
Two opposite failure modes in `update run`:

- pulsenode was reported "updated" every night though its image never
  changed: the pre-pull image-ID snapshot came back empty (the awk
  fallback used \s, which mawk silently ignores), and empty != populated
  was read as "changed".
- coolify was never recreated despite a new image: its nightly pull kept
  hitting a transient `toomanyrequests`, and a failed pull only warned
  before falling through to the comparison, which then saw no change.

Changes:
- _stack_image_ids: POSIX [[:space:]] instead of \s; return non-zero when
  images can't be resolved so callers can tell "unknown" from "unchanged".
- Retry `docker compose pull` 3x with backoff; if it still fails, add the
  stack to a new `skipped` list and skip the recreate instead of treating
  it as up to date.
- Detect changes by comparing running containers' image IDs against the
  post-pull resolved config, so a transient empty read can't be mistaken
  for "everything changed".
- Notify with an amber "finished with warnings" summary listing skipped
  stacks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-30 17:11:00 +00:00
valknar db4fc948d8 fix(stacks): surface pull failures and log before/after image IDs on mismatch
update run silently swallowed pull errors and never logged what actually
differed, making a recurring false "updates found" for pulsenode (no
registry-side change since Aug 19) impossible to diagnose.
2026-08-22 09:22:13 +02:00
valknar f703b52d44 chore: cleanup bin/README.md 2026-06-29 16:17:08 +02:00
valknarandClaude Sonnet 4.6 2a7059783b revert(arty): remove glow style workaround — use GLAMOUR_STYLE in zshenv
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 18:24:48 +02:00
valknarandClaude Sonnet 4.6 f9d4ab8c33 fix(arty): work around glow ~ expansion bug in style path
glow v2.1.2 validates the style path with ~ expanded but passes the
original unexpanded string to glamour's file reader, causing ENOENT.
Fix: pass the style via --style flag so bash expands $HOME before glow
sees it. Revert glow.yml style to "auto" (unused when arty drives it).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 18:20:42 +02:00
valknarandClaude Sonnet 4.6 22e8229903 fix(arty): render description as plain markdown, not blockquote
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 10:46:35 +02:00
valknarandClaude Sonnet 4.6 a8d2f457eb feat(arty): generate full Markdown doc in notes command
- New generate_notes_md(): builds title, description blockquote,
  dependencies table, per-script fenced blocks, and details section
  from the entire arty.yml using existing yq helpers
- show_notes() now accepts --raw to print raw Markdown; formatted
  mode pipes through the same glow/mdcat/python3 render pipeline
- Removes the decorative ━━━ border (clashes with full-document output)
- main() passes args[] through to show_notes for flag forwarding

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 10:42:57 +02:00
valknar 30eaba9971 fix: add git config cmd to setup 2026-06-24 04:59:55 +02:00
valknarandClaude Sonnet 4.6 af6beaff1e revert: remove SYSTEMD_COLORS/SYSTEMD_PAGER from logs — no effect without TTY
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:25:56 +02:00
valknarandClaude Sonnet 4.6 5a6e209b6d fix: use SYSTEMD_PAGER=cat instead of --no-pager for colored journal logs
--no-pager causes journalctl to disable ANSI colors. Setting SYSTEMD_PAGER=cat
achieves the same effect (no interactive pager) while preserving color output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:21:14 +02:00
valknarandClaude Sonnet 4.6 4276a5b94e fix: pass SYSTEMD_COLORS=1 to systemctl/journalctl for colored output
systemctl and journalctl use their own color detection (SYSTEMD_COLORS env
var) independently of the terminal — child processes don't always inherit
it. Force colors for status and logs subcommands of update and backup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:18:17 +02:00
valknarandClaude Sonnet 4.6 65acede0a5 fix: combine Environment= into single line in systemd units
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:15:45 +02:00
valknarandClaude Sonnet 4.6 bf396972b0 fix: bake STACKS_DIR into systemd service units at install time
The update and backup services ran without STACKS_DIR since systemd
doesn't source ~/.env or ~/.zshrc. Capture the value at install time
and write it as Environment= in the generated unit files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:12:31 +02:00
valknarandClaude Sonnet 4.6 3ef96ff8ab fix: stacks STACKS_DIR defaults to PWD instead of ~/stacks
Makes stacks work like arty — discovers stacks in the current directory.
Explicit STACKS_DIR env var still takes precedence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 18:11:58 +02:00
valknarandClaude Sonnet 4.6 7f5991c1bd fix: setup and arty completion bugs
bin/setup:
- Fix Step 1 of 6 → Step 1 of 7
- exec zsh -l </dev/tty to avoid inheriting stale curl pipe on stdin
  (without /dev/tty the curl|sh pipe bytes re-run the script as zsh)
- Fall back to printing exec zsh hint when /dev/tty is unavailable
- Check completion file existence instead of trusting arty exit code

bin/arty:
- Fix cmd_completion returning exit 1 for zsh: last statement was
  [[ "$shell" == "bash" ]] which is false, changed to if/fi

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 16:26:13 +02:00
valknarandClaude Sonnet 4.6 febcd99e35 fix: exec zsh -l at end of setup, remove exec zsh hint
The script already sets zsh as default shell via chsh. Now it also
hands off to a zsh login shell immediately at the end so the user
doesn't need to run exec zsh manually.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 16:18:42 +02:00
valknarandClaude Sonnet 4.6 24e3c050c0 fix: add zsh step, use arty completion zsh --install
- Add ensure_zsh step (step 3 of 7): installs zsh via apt/brew if
  missing, sets it as default shell via chsh
- Replace manual completion write with arty completion zsh --install
- Extend PATH with ~/.local/bin and ~/go/bin before completion step so
  yq installed by arty deps (in a subshell) is found
- Renumber all steps 1-7

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 16:11:23 +02:00
valknarandClaude Sonnet 4.6 7e16a6475b feat: add bin/setup bootstrap script and update README installation docs
- bin/setup: curl-pipeable installer — re-execs with bash, detects OS,
  installs git (apt/xcode-select), clones dotfiles into ~, runs arty deps,
  installs arty zsh completion, prints next steps; fully idempotent
- README.md: replace Quick Start with Installation one-liner, add step table,
  After Installation and Manual Setup sections; fix stale ~/scripts reference
- .gitignore: whitelist bin/setup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 15:57:45 +02:00
valknarandClaude Sonnet 4.6 cfee542f35 chore: update bin scripts — rename references from .sh to plain names
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 15:39:21 +02:00
valknarandClaude Sonnet 4.6 f38b15f550 feat: move scripts from ~/scripts to ~/bin and track in git
Drop .sh extension — scripts are now invocable directly as arty and stacks.
Remove redundant aliases from .zshrc since ~/bin is already in PATH.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 15:36:45 +02:00