From 4937fd6e62aceb01c2a234a788e582e03638967c Mon Sep 17 00:00:00 2001 From: fisher Date: Sun, 23 Aug 2026 07:52:17 +0000 Subject: [PATCH] Match house writing style, add docs/hints.md --- bin/__pycache__/cd-targetcpython-312.pyc | Bin 0 -> 9226 bytes bin/cd-deploy | 2 +- bin/cd-status | 2 +- bin/cd-target | 2 +- docs/OPERATIONS.md | 4 +-- docs/hints.md | 32 +++++++++++++++++++++++ 6 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 bin/__pycache__/cd-targetcpython-312.pyc create mode 100644 docs/hints.md diff --git a/bin/__pycache__/cd-targetcpython-312.pyc b/bin/__pycache__/cd-targetcpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bef1e657d045244b49921b9c173ffa5309b9acd8 GIT binary patch literal 9226 zcmcgyTTmNUn(kJ&q?WoR0mgvwg*MpO;^qW9H=Nju4K|KrVHyg@m84K%q-cYYMrX78qd?lGY^}peGwK6Ooy#upoW16DoD4FV} zWLkE_=pje9gT^uwW4alVv)wGoo!w57ySiN@cXzu<&UJH;voX(*x7$lo4odMV{3p;a zJ_EbVJU9KsdKoCstu@Q}>bm`;Pv^kCJoNh?u9KaLUv`c26!nS2{A$mpyHIv_7s{I%B3<7d5K&m3y_z}yJR2aWsv(J-vxO9@^Z)vAm1&Q%Y~5d zk$1~QkndIY$vXxQQC1FDlwp`uP4LG%5W?(CTbBiIt+clOrW>KpxCFx6;;v`Dyb8rap*G^Q&emxX@fXt zn0UVu8-_X{?1v2I9f!%O8V>S&M|;Q{)iov7TPJD>>{(TCvC35`qQhDfad;gXjwwS* zT$l7{A}%I+kqnlmN619gWK7XuzdDjVur$~)S!?o&@TiKGh>hSPaA(B!mqV?WkA#{p zv_g%!OX8`^&7sq6;;Z%bxI1E7dq?MMq%F3;s7B+usKNAO^=~8-x+06`Tf3fnsriK$ zTg6y3u4rO!0vD7s8S@MqvVF8(jq2i2akO8Fi}8fHvt;Jb_^W~zxgFIfZs4DaZ zlTOC;C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VasXuKcA-Psy|YJFDd>@%JU^9d`bDfq`dz@ zm3<`?%$B_qS`{jngvyL?U{$DH5^7h4#wDR~((?_(91CV0bKdLTIsbKky5g~$!CUdA z#uqXL7czWklDo?blia4OfUe!FcF^bOO|OeSMQ;{)X>qgMK{sxCi|FFb8Yk`BEbu^5 tMiK{/dev/null 2>&1 \ - || warn "ntfy notification failed (deploy outcome itself is unaffected)" + || warn "ntfy notification failed (the deploy itself is unaffected)" } # ------------------------------------------------------------------- lock --- diff --git a/bin/cd-status b/bin/cd-status index aeed84a..4ea600f 100755 --- a/bin/cd-status +++ b/bin/cd-status @@ -4,7 +4,7 @@ # # Written because "the timer is active" was never proof of anything in this # fleet -- the same lesson the uas-ng updater documents. This shows the daemon, -# the socket, and the outcome of the last deploy for each target. +# the socket, and how the last deploy for each target ended. set -Eeuo pipefail diff --git a/bin/cd-target b/bin/cd-target index c710b37..07947a6 100755 --- a/bin/cd-target +++ b/bin/cd-target @@ -9,7 +9,7 @@ itself, so there is exactly one implementation of the matching rules. Subcommands: resolve --repo OWNER/NAME --branch BRANCH [--host HOST] Print shell-quoted KEY=VALUE lines for the matching target. - Exit 3 when nothing matches (a normal, non-error outcome: it just + Exit 3 when nothing matches (a normal, non-error result: it just means this push is not ours to act on). list [--host HOST] diff --git a/docs/OPERATIONS.md b/docs/OPERATIONS.md index 40fc6b8..a98aaac 100644 --- a/docs/OPERATIONS.md +++ b/docs/OPERATIONS.md @@ -11,8 +11,8 @@ design. An active service is not proof of anything on its own — the same lesson the `uas-ng` updater documents. `cd-status` shows the daemon state, whether the port -is genuinely listening, the hook endpoints, and the outcome of the last deploy -per target. +is genuinely listening, the hook endpoints, and how each target's last +deploy ended. ## Where things are diff --git a/docs/hints.md b/docs/hints.md new file mode 100644 index 0000000..16ac692 --- /dev/null +++ b/docs/hints.md @@ -0,0 +1,32 @@ +# Hints + +Short notes on things that were not obvious. Prune stale ones. + +- **`bin/cd-target` cannot be imported normally.** The hyphen in the filename is + not a valid Python identifier, so `bin/cd-render-hooks` loads it through + `importlib.machinery.SourceFileLoader`. Importing `importlib.util` alone is + not enough — `importlib.machinery` needs its own import. + +- **`docker/metadata-action`'s `type=sha,format=short` produces 7 characters.** + That is why `image_tag_template` uses `{short7}`. domaindingo's `build.yml` + prefixes it with the branch, giving `test-sha-abc1234` / `prod-sha-abc1234`. + +- **domaindingo's compose stacks are not in the domaindingo repo.** Test and + prod both live in `sysadmin/uas-ng` at + `docker/domaindingo/s5.fisher.hu/` (`docker-compose.yml` and + `docker-compose-prod.yml`). The `scripts/deploy-*.sh` files still in the + application repo point at compose files that do not exist on s5 — they are + dead code for both environments that matter. + +- **domaindingo test and prod both run on s5, not s2.** Only dev is still on s2. + The `hostname != s2` guard in the old scripts therefore matched nothing and + `exit 0`d, which reads as success. + +- **Registry tags in this fleet have drifted before.** `domaindingo:0.1.149` + once resolved to a different image than the one running, with a broken + `/login`. This is why `cd-deploy` checks + `org.opencontainers.image.revision` and deploys by digest. + +- **`docker compose down -v` destroys the data volumes** for these stacks. The + retired paradicsomleves test script used it. `cd-deploy` only ever runs + `up -d`.