Commit c7643e5
authored
fix(ci): scope build-binary and build-docs to production environment (#773)
## Summary
The Bun binary's sourcemaps have **never** been uploaded to Sentry.
Every main-branch build logged:
```
SENTRY_AUTH_TOKEN: ← empty!
No SENTRY_AUTH_TOKEN, skipping sourcemap upload
```
Root cause: `SENTRY_AUTH_TOKEN` is scoped to the **production** GitHub
environment (not a repo secret). Jobs without `environment: production`
cannot access it.
- `build-binary` → **missing environment** → token empty → upload
skipped
- `build-docs` → **missing environment** → `env.SENTRY_AUTH_TOKEN != ''`
gate fails silently
- `build-npm` → had `environment: production` → token available →
sourcemaps uploaded ✓
## Verification
Sentry artifact bundles (`sentry api
projects/sentry/cli/files/artifact-bundles/`):
| File | Bundle count |
|---|---:|
| `~/index.cjs` (npm) | **100** |
| `~/dist-bin/bin.js` (binary) | **0** |
Every Sentry event from the Bun binary (e.g. `CLI-15H`, `CLI-SS`) shows
minified function names like `xE`, `yxe`, `oet` — server-side
symbolication has nothing to resolve against.
## Fix
Add `environment: production` to `build-binary` and `build-docs`,
matching the pattern already used by `build-npm`.
## Expected impact
- Next build on `main` uploads the Bun binary's sourcemap for the first
time
- New binary-originated events resolve to real function names
(`viewCommand.func`, `withTelemetry`, …)
- Grouping quality improves — combined with the server-side fingerprint
rules from #769, most fragmentation should disappear1 parent 169f8fe commit c7643e5
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
221 | 225 | | |
222 | 226 | | |
223 | 227 | | |
| |||
683 | 687 | | |
684 | 688 | | |
685 | 689 | | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
686 | 693 | | |
687 | 694 | | |
688 | 695 | | |
| |||
0 commit comments