chore: Settle one name for the GlitchTip DSN across the fleet #64
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#64
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
The same GlitchTip DSN is stored under two different secret names across the fleet, and in one repo a single name covers two scopes:
ahmad/expiro— the Forgejo repo secret isVITE_GLITCHTIP_DSN, consumed as a build arg (release.yml:196).ahmad/larda— the repo secret isGLITCHTIP_DSN.release.yml:196maps it to theVITE_GLITCHTIP_DSNbuild arg for the web bundle, andGLITCHTIP_DSNis also the name of the api's runtime value from OpenBaosecret/larda(release.yml:344,deploy.yml:154).Two costs. Someone wiring a third repo has no rule to copy — both existing repos are precedents and they disagree. And in
lardathe two uses cannot be given different values or rotated separately, because they share a name: the DSN baked into a public bundle and the one the server process holds are the same string by construction rather than by decision.Found while reviewing
infrastructure-vps#428. Filed first asahmad/larda#52and moved here on 2026-09-08: it is a fleet-wide naming convention, so it belongs where fleet conventions live rather than inside one of the repositories it governs.Scope
ahmad/lardaandahmad/expiro, applied to the Forgejo repo secrets, the workflows,docs/CONFIGURATION.mdand.env.examplein each; a decision on whether the web build-time value and the api runtime value are one secret or two.amtronics/infrastructure-vps.Decision needed before this can start
Renaming a Forgejo repo secret means creating the new one and deleting the old, which is provisioning work this loop does not do. Two questions, both for a human:
GLITCHTIP_DSNfor the api runtime andVITE_GLITCHTIP_DSNfor the web build arg — separately settable, and honest that one is public in the bundle and one is not — or a single name in both repos.larda's name changesexpiro; aligning on split names changes both.Once those are answered and the secrets exist under the chosen names, the workflow, documentation and
.env.examplechanges are ordinary work.Acceptance criteria
docs/CONFIGURATION.mdin each repository, when it is read, then each name's scope and "where it lives" match where the value was actually stored.Decision, so this stops blocking
ahmad/expiro#80.Two names, not one.
VITE_GLITCHTIP_DSNfor the browser bundle,GLITCHTIP_DSNfor an api runtime. They are not the same kind of value: the first is compiled into a public artefact and is readable by anyone who loads the page, the second is only ever held by the server. Collapsing them means one rotation touches both scopes, and a public value ends up in the store meant for private ones. TheVITE_prefix is also not decoration — it is what makes the bundler expose the value — so the web one cannot be renamed anyway.No repository is renamed.
ahmad/lardakeepsGLITCHTIP_DSNfor its api and maps it to theVITE_GLITCHTIP_DSNbuild arg for the web bundle; that mapping is correct and stays.ahmad/expirokeepsVITE_GLITCHTIP_DSNand addsGLITCHTIP_DSNwhen it gains an api reporter. Nothing loses a working secret and no deploy breaks on a name that moved.Where each lives. The browser DSN is a public ingest address, so it belongs in the app's
variables.ymlas a Forgejo variable. The api DSN is a vault secret synced to OpenBaosecret/<app>, which is how larda's was provisioned. Where a repo currently carries the browser DSN as a secret instead, that is a tidy-up to do when the repo is next touched, not a rename.The rule for a third repo:
VITE_GLITCHTIP_DSN— build arg, public, variable.GLITCHTIP_DSN— runtime, private, vault. That belongs in this repository's README beside the other fleet conventions, and this issue can carry that change.Taking this, on the decision above. It is smaller than the body's scope,
because the decision resolved most of it by not renaming anything.
What I checked first, rather than assuming from the workflows. Read
the actual storage back from the API for both repositories:
ahmad/expiroVITE_GLITCHTIP_DSNahmad/lardaGLITCHTIP_DSNNeither has a GlitchTip variable. Both api runtime DSNs come from
OpenBao
secret/<app>.So two changes, one pull request each.
Here — the rule into the README's contract section:
VITE_GLITCHTIP_DSNbuild-time, public, a variable;GLITCHTIP_DSNruntime, private, a vault secret. That is what a third repository has
to copy, and it is the part of this issue that outlives it.
ahmad/expiro— itsdocs/CONFIGURATION.mdcontradicts itself onthe row this issue is about: type says
variable, "where it lives"says
Forgejo repo secret, and the API says secret. Acceptancecriterion two asks the document to match where the value is actually
stored, so the type becomes
secret, with the move to a variablerecorded as the pending tidy-up the decision calls it rather than
written up as though it had happened.
ahmad/lardaneeds no change. Its single row already says one secretfeeding a build arg and a runtime value, which is exactly what it does
and what the decision blessed. I am not splitting it to satisfy a
symmetry the decision explicitly declined.
Not doing, and saying so: moving
expiro's browser DSN from a secretto a variable. That is provisioning — creating one and deleting the
other — which this loop does not do, and the decision already calls it a
tidy-up for whenever the repository is next touched for that purpose.
Done. Two pull requests, both merged:
19fa5cdahmad/expiro's doc corrected1490382The README's contract section now carries the rule a third repository
copies:
VITE_GLITCHTIP_DSN— build time, public by construction, aForgejo variable.
GLITCHTIP_DSN— runtime, private, an OpenBao secret.With why collapsing them is the mistake, and why the
VITE_prefix meansthe public one cannot be renamed anyway.
No repository was renamed and no secret moved, per the decision above.
What actually needed changing was smaller than the issue's original scope,
and one thing needed changing that the issue had not spotted:
ahmad/expiro'sdocs/CONFIGURATION.mdtypedVITE_GLITCHTIP_DSNas avariablewhile itsown "where it lives" column said
Forgejo repo secret. Read back from theactions API, it is a secret. Corrected, with the move to a variable recorded
as the pending tidy-up it is rather than written up as done.
ahmad/lardaneeded nothing: its single row already describes one secretfeeding a build arg and a runtime value, which is what it does and what the
decision blessed. Splitting it for symmetry would have contradicted the
decision.
Unverified, and not claimed: that a release of each app still reaches
GlitchTip from both the bundle and the api. No workflow, secret or build
argument changed in either repository, so nothing can have broken — but
that is an argument from an empty diff, not an observed event in GlitchTip.