external modules: the bell row is keyed on the URL alone, so two refs of one repo share one notification #61
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?
Residual from the approving review on #40 — pre-existing, explicitly out of that PR's scope, filed as the follow-up it named.
#40 made
(url, ref)first-class in three places: the fault signature (<srcDir>.recovery-fault-<fnv1a(ref)>), the failure record (ModuleFailure.configuredRef), and the retry chain's config lookup. The notification key did not move with them.externalFailureKeyinpackages/server/src/modules/alerts.tsis derived frommoduleSlug(url), andmoduleSlugis deliberately credential-free and ref-free. So two configured entries for one repo —— write into the same bell row. Consequences, in the order an operator meets them:
#devfailing overwrites the row#main's failure raised, so the bell names one repo and one reason where there were two./systemstill shows the failing one, so the two disagree — which is the exact split #40'sstage: "retry"handling exists to prevent elsewhere.Not a wedge and nothing is lost on disk: the failure record, the signature and the retry chain are all per-ref already, so recovery behaviour is correct. What is wrong is only what the operator is told.
Why it was not fixed in #40
That PR is seven rounds deep on a destructive-recovery fault, and this is a behaviour change to the alert surface rather than a mechanical rename — it wants a decision and a migration:
slugifydid — but every deployment holding a row under the current key needs the same boot sweepmigrateExternalAlertKeysalready performs for the pre-digest slug, extended to the ref. That function is the place, and its comment already explains why the migration cannot live in the alert calls.The first matches everything else #40 did; the second is defensible if a repo's refs are meant to read as one module. Whichever,
packages/server/tests/external_modules_test.tshasrefs that share a work tree do not share a boundas the fixture shape to copy.Source: #40 (comment) (last non-blocking item).