fix(rees): upload Sentry source maps for Railway deploys - #1726
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review — held for maintainer review
⏸️ Held for maintainer review — Touches a guarded path — held for manual review Review summary Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
8c9231d to
34be5f1
Compare
34be5f1 to
f00a079
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1726 +/- ##
=======================================
Coverage 95.58% 95.58%
=======================================
Files 204 204
Lines 22316 22316
Branches 8067 8067
=======================================
Hits 21331 21331
Misses 408 408
Partials 577 577
🚀 New features to boost your workflow:
|
Summary
What changed
gittensory-rees@<RAILWAY_GIT_COMMIT_SHA>unlessSENTRY_RELEASEis explicitly set.@sentry/cli, associates commits when Railway commit metadata is present, records a deploy, finalizes the release, then startsdist/server.js.tsconfigemits inline source contents, andvalidate:sourcemapschecksdist/server.js,dist/server.js.map,sourceMappingURL, original sources, andsourcesContent.reesjob and the root gate gets a self-preparingrees:testscript.review-enrichment/so REES changes are inside the repo's allowed contribution scope.Why
REES deploys automatically from Railway after merges to
main, so release/source-map upload needs to happen against the exact bundle Railway built, without asking contributors to run Sentry commands and without passing Sentry auth through Docker build args.Validation
npm --prefix review-enrichment testnode review-enrichment/dist/upload-sourcemaps.jsnpm run actionlintnpm run rees:testnpm run typechecknpx vitest run test/unit/gittensory-focus-manifest.test.tsnpm run test:cidocker build -f review-enrichment/Dockerfile review-enrichment -t gittensory-rees:sentry-smoke/healthreturned ok, Sentry upload skipped cleanly without Sentry env, and the running container had nodist/*.mapfiles after startup cleanup.Notes
SENTRY_AUTH_TOKEN,SENTRY_ORG, andSENTRY_PROJECT;SENTRY_DSNenables SDK error capture./app, Source Code Rootreview-enrichment, Branchmain.SENTRY_RELEASEshould only be set for custom deployments when that exact release/source-map bundle has been uploaded.