feat(control-plane): report tenant containers to the central Sentry DSN (#7876)#8269
feat(control-plane): report tenant containers to the central Sentry DSN (#7876)#8269jeffrey701 wants to merge 1 commit into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8269 +/- ##
==========================================
- Coverage 92.15% 91.63% -0.53%
==========================================
Files 786 786
Lines 78860 78884 +24
Branches 23801 23800 -1
==========================================
- Hits 72676 72285 -391
- Misses 5062 5524 +462
+ Partials 1122 1075 -47
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-23 21:23:33 UTC
Review summary Nits — 1 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
Hi, @jeffrey701 |
JSONbored
left a comment
There was a problem hiding this comment.
Not yet available, blocked as per the development pipeline.
Summary
Wires the hosted fleet's tenant containers to report to the central Sentry DSN (#7876, implements #4934), reusing
src/selfhost/sentry.ts's existing opt-in init rather than building a second Sentry-wiring mechanism.A tenant container runs an unmodified self-host image (root Dockerfile for ORB,
packages/loopover-miner/Dockerfilefor AMS), whose process already inits error reporting fromSENTRY_DSNviasrc/selfhost/sentry.ts→src/server.ts:336'sinitSentry(process.env)(a complete no-op when unset). So pointing the fleet at the central DSN is purely injecting that value at container cold boot — the exact seamLOOPOVER_PINNED_VERSION(#4898) andLOOPOVER_TENANT_SECRET_TOKEN(#8202) already use.container-driver.ts: newSENTRY_DSN_ENV_VAR+ optionalcentralSentryDsnonContainerDriverConfig;createTenantContainerinjects it into the container'sstart()envVars alongside the existing pinned-version / bootstrap-secret vars. Absent/blank ⇒ omitted, byte-identical to the pre-Wire hosted control-plane + tenant containers to report to the central PostHog project (implements #4934) #7876start()call.driver-factory.ts+worker.ts: thread the central DSN from the control-plane's ownenv.SENTRY_DSN(a secret provisioned by Provision a loopover-owned Posthog project for the hosted fleet #7875) into the container driver. Unset ⇒ nothing injected.env.d.ts: declaresSENTRY_DSNas the control-plane secret (kept a secret, never a committed var).Self-host is completely unaffected:
src/selfhost/sentry.tsis untouched; an operator who sets their ownSENTRY_DSNbehaves exactly as before. This only supplies a value the hosted platform would otherwise leave unset, and only at the hosted provisioning path.Scope note
This covers the tenant-container half end-to-end (where the fleet's actual review/compute error volume lives). The control-plane Worker's own SDK reporting is a deliberate follow-up: it needs a Worker-runtime Sentry SDK (
@sentry/hono, as the main app uses), butcontrol-plane/is a non-workspace package with its own isolatednpm ci, and adding@sentry/honothere hits an unresolvable@cloudflare/workers-typesv4-vs-v5 peer conflict that would break that install — so it is intentionally not forced into this PR.Validation
control-planebuild + fulltest:node(206 tests) green; 100% line + branch coverage on both changed source files (container-driver.ts,driver-factory.ts), verified against the realcontrol-plane:coveragelcov harness — the package stays at its established 99.5%+ with these additive tests.cf:typecheck(worker tsconfig, coversenv.d.ts+worker.ts) and the rootnpm run typecheckare green; the full changed-graphtest:changednet passes.SENTRY_DSNwhen the config carries the central DSN; it merges with pinned-version + bootstrap-secret into onestart(); a blank/unset DSN injects nothing (byte-identical); and the factory threadsenv.SENTRY_DSN(and omits it for""/" "/unset).Closes #7876