docs: Record how the error-reporting DSN is named #73
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
amtronics/platform-actions!73
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/64-dsn-naming"
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?
Issue
Closes #64
Problem
The same GlitchTip DSN is stored under two different names across the
fleet, and someone wiring a third repository has no rule to copy —
ahmad/expiroandahmad/lardaare both precedents and they disagree.The decision was taken on #64; this records it where the next person will
look, which is the only reason the disagreement stops recurring.
Solution
A short subsection in the README's contract section, beside the other
fleet conventions:
VITE_GLITCHTIP_DSN— read at build time, compiled into the bundle,readable by anyone who loads the page, and therefore a Forgejo
variable in the app's
variables.yml.GLITCHTIP_DSN— read at runtime by the server process only, andtherefore a vault secret in OpenBao
secret/<app>.It states why collapsing them into one name is the mistake: a single
rotation would touch both scopes, and a value that is public by
construction would live in the store meant for private ones. It also
notes that the
VITE_prefix is what makes the bundler expose the value,so the public one cannot be renamed even if someone wanted to.
Review notes
No workflow changes, in this repository or any other. The decision on #64
was explicitly that no repository is renamed:
ahmad/lardakeepsGLITCHTIP_DSNand maps it to theVITE_GLITCHTIP_DSNbuild arg, whichis correct and stays;
ahmad/expirokeepsVITE_GLITCHTIP_DSNandalready has a separate
GLITCHTIP_DSNfor its api. Nothing loses aworking secret and no deploy breaks on a name that moved.
markdownlint-cli2@0.23.2— the exact version the README lint step runs— exits 0 on this file.
The last paragraph is deliberate rather than padding: a DSN can submit
events and not read them, so a leaked browser DSN is noise rather than a
disclosure. Without that, the natural reading of "public by construction"
is that someone was careless, and the next person tries to hide it.
Risks and trade-offs
Documentation only. The risk is the ordinary one for a convention: it is
recorded in a README rather than enforced by anything, so a repository
can still deviate silently. Enforcing it would mean a check that reads
every consumer's variables and secrets, which is worth doing only if it
turns out to drift again.
Verified against each acceptance criterion, before marking this ready.
references the retired one." Nothing was retired — the decision was
explicitly that no repository is renamed — so this is checked by
reading both repositories' workflows back rather than by changing them.
ahmad/lardareferencesGLITCHTIP_DSN(repo secret) and maps it tothe
VITE_GLITCHTIP_DSNbuild arg;ahmad/expiroreferencesVITE_GLITCHTIP_DSNfor the bundle andGLITCHTIP_DSNfrom OpenBaofor the api. Both match the convention this PR records, and neither
needed a change.
scope, the store and the reason for each of the two names.
markdownlint-cli2@0.23.2— the pinned version the README lintstep runs — exits 0 on this file.
The remaining criterion is the other repository's, and it is the one
that needed a change:
docs/CONFIGURATION.mdmust say where each valueis actually stored.
ahmad/expiro's saidvariablefor a value the APIreports as a secret; corrected in ahmad/expiro#83.
ahmad/larda's singlerow already describes one secret feeding a build arg and a runtime value,
which is exactly what it does, so it is untouched.
Unverifiable here, and not claimed: "a release of each app still
reaches GlitchTip from both the web 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 the diff being empty of
behaviour, not an observed event in GlitchTip.
WIP: docs: Record how the error-reporting DSN is namedto docs: Record how the error-reporting DSN is namedApproved. The convention is worth writing down and it matches what the fleet already does — I checked rather than taking the two precedents named in the description.
Surveyed every repository's workflows for a GlitchTip DSN:
So the rule this records is not aspirational: eight of ten already follow it, and the two exceptions are exactly the two the description names.
lardamapping its runtime-named secret into theVITE_build arg is the one I would have expected to be a mistake, and it is not — it is a single-value app doing the sensible thing, which is why "no repository is renamed" is the right decision to attach to this.The last paragraph earns its place. Saying that a DSN submits and cannot read is what stops the next reader treating "public by construction" as somebody's carelessness and trying to hide it — which would end with the browser value in the vault and the whole distinction collapsed. That is the failure mode the section exists to prevent, so explaining it is not padding.
I would not add adoption counts to the document, for what it is worth: a README states the rule, and 8-of-10 is status that ages. The place for the number is the review and the issue, which is where it now is.
VITE_being the mechanism rather than a naming choice is the detail that makes the rule non-negotiable, and it is stated. No findings.