chore: Carry the non-blocking notify fetch to the eight consumers #68
Labels
No labels
priority/P0
priority/P1
priority/P2
priority/P3
size/L
size/M
size/S
size/XL
size/XS
state/blocked
state/done
state/in-progress
state/in-review
state/needs-refinement
state/ready
type/bug
type/chore
type/feature
type/refactor
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
amtronics/platform-actions#68
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
#65madeopenbao-fetchable to tolerate an unreachable vault (required: false) and set it ontemplates/release.yml'snotifyjob. The template is copied into consumers rather than called — no repository references a reusable workflow — so the tolerance reaches a repository only when its ownnotifyjob gains the line.Until then, an OpenBao blip still turns a build that was fine into a red run in every repository below. This is not a regression from
#65; it is the failure#65describes, still unfixed for existing consumers.Surveyed 2026-09-09 from the checked-out trees. Every job here fetches from OpenBao purely to send a notification:
notifyjobahmad/portfoliorelease.yml,pr.yml,deploy.yml,monitoring.ymlahmad/triprelease.yml,deploy.ymlahmad/imamahrelease.yml,deploy.ymlbayan/kidpointsrelease.yml,deploy.yml,monitoring.ymlbayan/stemrelease.ymlsuhba/khittarelease.yml,deploy.yml,monitoring.ymlsuhba/suhba-docsrelease.yml,deploy.ymlsuhba/suhba-webrelease.yml,deploy.ymlahmad/expiroandahmad/lardahave no fetchingnotifyjob and need nothing.Scope
required: falseto theopenbao-fetchstep of everynotifyjob listed above, and making the load step beside it tolerate an empty or absent file the way the template now does; one pull request per repository.deploy,publish,versionanddashboardjobs — those genuinely need their secrets and must keep the fatal default (#65surveyed them: most have no guard after the fetch, so a tolerant fetch there would start containers with noDATABASE_URLand report success); changing which events notify; the message format.Acceptance criteria
deploy,publish,versionordashboardjob in those repositories, when its fetch fails, then it still fails the job — the flag is not spread beyondnotify.notifyjob'sopenbao-fetchstep carriesrequired: false.Correcting the table in the body: it is short, and short in a way that matters. Review of
#65pointed out that my survey walked local checkouts rather than the fleet, so it could only see repositories I happen to have cloned and up to date. Re-run against the API — every repository the server lists, every file under.forgejo/workflows/, parsed rather than grepped:12 repositories use
openbao-fetch, across 35 workflow files. My original list had 9 and the review's had 11;Bayan/bayan-webis in neither.Classifying every call by whether the job's only use of the secrets is sending a notification:
Jobs to change — 26, across 10 repositories
notifyjobsahmad/portfoliorelease.yml,deploy.yml,pr.yml,monitoring.ymlBayan/bayan-webrelease.yml,deploy.yml,pr.yml,monitoring.ymlBayan/kidpointsrelease.yml,deploy.yml,monitoring.ymlahmad/nameyrelease.yml,deploy.yml,pr.ymlsuhba/khittarelease.yml,deploy.yml,monitoring.ymlahmad/triprelease.yml,deploy.ymlahmad/imamahrelease.yml,deploy.ymlsuhba/suhba-docsrelease.yml,deploy.ymlsuhba/suhba-webrelease.yml,deploy.ymlBayan/stemrelease.ymlahmad/expiroandahmad/lardahave no notification-only job and need nothing.pr.ymlandmonitoring.ymlmatter as much asrelease.yml, which the original scoping missed: a pull-request check or a monitoring sync going red because the vault blinked is the same failure as a release doing it, and arguably worse — it lands on somebody's PR.Jobs that must not change — 57
Every
deploy,publish,version,dashboard,sync,validateandopen-prjob in those repositories genuinely reads the secrets.#65surveyed what follows the fetch in each: most have no guard, so a tolerant fetch there would start containers with noDATABASE_URLand report success. The flag goes onnotifyand nowhere else, and criterion 3 below is what proves it did not spread.The method, since the first table was wrong
Enumerate repositories from
GET /orgs/{org}/reposandGET /users/{u}/repos, list.forgejo/workflows/per repository through the contents API, and attribute eachopenbao-fetch@line to its job by walking back to the enclosing^ <job>:. A claim of the form "every consumer does X" is only as wide as the enumeration behind it, and a local checkout is not that enumeration.Starting this, one repository at a time, and beginning with
ahmad/portfolio— it has four affected jobs, more than any other, and itspr.ymlcase is the one that lands somewhere a person is already looking.Scope of this first pull request:
portfolio'snotifyjobs inrelease.yml,deploy.yml,pr.ymlandmonitoring.ymlgainrequired: falseon theiropenbao-fetchstep, and the load step beside each tolerates an absent or empty file the way the template now does. Nothing else in those workflows changes, and nodeploy,publish,versionorsyncjob is touched — those genuinely need their secrets and the table above says so.Ordering.
#67is merged, soopenbao-fetch@v3already carries the input; a consumer settingrequired: falsetoday gets the behaviour immediately rather than waiting on anything.What I will check before opening it, since "the flag is on the right jobs" is the whole of this change: every
openbao-fetchstep in each edited file, listed with its enclosing job and whether it now carries the flag — so the diff can be read against the table rather than trusted.The remaining nine repositories follow in later iterations, one pull request each as the scope says. I will keep the list here updated as they land, so what is left is visible without reading ten PRs.
1 of 10 open.
ahmad/portfolio→#86, green and ready. Fournotifyjobs (release,deploy,pr,monitoring); its five secret-reading jobs untouched, audited job by job in the PR body.Worth noting from doing the first one:
PR / notifyon that repository's own pull-request pipeline ran green against this change, which is the fetch path in question exercised for real rather than reasoned about. It does not prove the tolerant branch — the vault answered — but it does prove the flag does not break the ordinary case, which is the half a reviewer cannot check by reading.Remaining, in the order I intend to take them (most affected first, so the biggest reductions land soonest):
ahmad/portfolioBayan/bayan-webBayan/kidpointsahmad/nameysuhba/khittaahmad/tripahmad/imamahsuhba/suhba-docssuhba/suhba-webBayan/stemCorrection to the survey above. It counted jobs by whether the fetch
declared
required, and never looked forcontinue-on-error. Two of the26 were already tolerant by that other mechanism:
Bayan/bayan-webpr.ymlnotifycontinue-on-error: trueon the fetch and the load stepahmad/nameypr.ymlnotifySo the fleet total is 24 jobs that fail on a vault outage, not 26.
The other eight repositories and every non-
pr.ymlworkflow have noguard of any kind — re-checked against the API, not local checkouts.
That both instances are
pr.ymland both are the same shape suggestssomeone hit this on a PR run and patched it where it hurt, without
carrying it to
deploy,releaseormonitoring. It is the same bugthis issue is about, found earlier and fixed locally.
I am converting those two to
required: falsein the same PRs ratherthan leaving them, so all ten repositories use one mechanism. It is a
strictly narrower guard:
continue-on-errorwould swallow a genuinedefect in the action as readily as an outage. Both PRs call this out
separately so it can be refused without refusing the rest.
Related: removing
continue-on-errorfrom the load step is onlysafe because that step survives an empty vault on its own. It runs under
set -euo pipefailand its middle line is[ -n "$v" ] && echo "::add-mask::$v", which returns non-zero when thevalue is empty. Exercised against a missing
.env, an empty one and apopulated one, it exits 0 in all three — a short-circuited
&&list isnot a
set -efailure, so the value simply lands empty andnotify-telegramskips.Progress: 2 of 10 open.
ahmad/portfolioBayan/bayan-webRemaining, in order:
Bayan/kidpoints,ahmad/namey,suhba/khitta,ahmad/trip,ahmad/imamah,suhba/suhba-docs,suhba/suhba-web,Bayan/stem.All ten repositories now have a PR. One merged, nine open.
ahmad/portfolio7bf823fBayan/bayan-webBayan/kidpointsahmad/nameysuhba/khittaahmad/tripsuhba/suhba-docsahmad/imamahsuhba/suhba-webBayan/stemThat totals 26 notify jobs, of which 2 were already guarded by
continue-on-error— so 24 fetches changed from required to not,which is the corrected figure from the comment above, arrived at
independently by counting the PRs. Every PR was verified by re-parsing
its workflows and reading
requiredback per job, not by reading thediff; each carries that audit as a comment.
A gap found while surveying, not folded in. Checking all 25
repositories on the server for workflows that deploy or release without a
notifyjob turned up exactly one:Bayan/stem'sdeploy.ymlruns adeploy job and has no notification at all, so deployments there succeed
or fail silently. Its
release.ymldoes notify, so the gap is specificto the deploy path. Opened as Bayan/stem#14 rather than added to
Bayan/stem#13, which is scoped to the
requiredflag.Nothing here needs an answer — the one open question is still whether to
keep
continue-on-errorin the twopr.ymlfiles instead of convertingthem, called out on Bayan/bayan-web#32 and ahmad/namey#76 so it can be
refused there without refusing the rest.
Done. All ten repositories merged.
ahmad/portfolio7bf823fBayan/bayan-web0b91a05Bayan/kidpoints1c97d58ahmad/namey383d3f1suhba/khitta1b18a15ahmad/tripb99586eahmad/imamah2f496fasuhba/suhba-docs45a62e6suhba/suhba-weba79f82aBayan/stemd574bee24 notify fetches now declare
required: false, out of 26 notify jobs— the other two were already tolerant via
continue-on-errorand wereconverted to the same mechanism, so no notify job on the fleet fails a
run when OpenBao is unreachable.
Two corrections were made along the way, both recorded above rather
than quietly fixed: the original survey counted 26 because it looked for
the absence of
requiredand never forcontinue-on-error; and thecontinue-on-erroron twopr.ymlload steps turned out to beguarding a failure that cannot happen, since a short-circuited
&&listdoes not trip
set -e.What is still unobserved. No repository has yet had a release or
deploy run while OpenBao was actually unreachable, so the behaviour is
verified against the action's contract and a local exercise of the load
step, not against a real outage. The next OpenBao blip is the test; if a
notify job fails then, this issue is where to come back to.
Two follow-ups came out of the pass and are filed separately:
Bayan/stem#14 (merged as Bayan/stem#15 — the one deploy workflow on the
server that reported nothing) and #72 (six repositories announce a
skipped deploy as a failure).