Summary
The docs site sourcemap upload step in CI has been a silent no-op since the Astro 6 upgrade (#816, merged 2026-04-22). Every push to main ran sentry sourcemap upload docs/dist/ with Files uploaded: 0, producing no Sentry symbolication for cli.sentry.dev.
Because the CLI's sourcemap upload command exited 0 on zero files ("No JS + sourcemap pairs found. Run sentry sourcemap inject first"), CI stayed green and the regression went unnoticed.
Timeline
Root cause
docs/astro.config.mjs sets:
vite: {
build: {
sourcemap: "hidden",
},
},
Astro 6 uses Vite 7's Environments API and reads the setting from vite.environments.{client,ssr}.build.sourcemap (see astro/dist/core/build/static-build.js:281), falling back to false if unset. The legacy top-level vite.build.sourcemap path is ignored for the client bundle. Astro 5 honored the legacy path, so the regression landed invisibly with the v6 upgrade.
Also: @sentry/astro's internal config-patching logic that normally re-applies sourcemap settings is gated on sourceMapsUploadOptions.enabled === true, which we intentionally set to false (we use our own CLI post-build to avoid pulling in @sentry/cli, see docs/astro.config.mjs:34). So that code path does not rescue us.
Fix (in-flight)
PR #TBD (follow-up to this issue):
- Set
vite.environments.{client,ssr}.build.sourcemap: "hidden" in docs/astro.config.mjs. Locally this yields 11 .map files in docs/dist/_astro/ (previously 0).
- Make
sentry sourcemap inject and sentry sourcemap upload error by default when zero JS+sourcemap pairs are discovered, with --allow-empty as an opt-in escape hatch. A silent zero-file upload/inject is almost always a bundler misconfiguration, and erroring out turns the next regression into an immediate CI failure.
- No CI wiring changes needed — the default-strict behavior catches the regression automatically on the next push.
Related
Summary
The docs site sourcemap upload step in CI has been a silent no-op since the Astro 6 upgrade (#816, merged 2026-04-22). Every push to
mainransentry sourcemap upload docs/dist/withFiles uploaded: 0, producing no Sentry symbolication forcli.sentry.dev.Because the CLI's
sourcemap uploadcommand exited 0 on zero files ("No JS + sourcemap pairs found. Runsentry sourcemap injectfirst"), CI stayed green and the regression went unnoticed.Timeline
Files modified: 0andFiles uploaded: 0in theInject debug IDs and upload sourcemapsstep. Confirmed via CI logs — e.g. run 24900297101.sourcemap upload. The new code path was never actually exercised on the docs site because no bytes were ever being sent. (The CLI-binary build, which uses the same API client, does exercise it — verified inBuild Binarylogs.)Root cause
docs/astro.config.mjssets:Astro 6 uses Vite 7's Environments API and reads the setting from
vite.environments.{client,ssr}.build.sourcemap(seeastro/dist/core/build/static-build.js:281), falling back tofalseif unset. The legacy top-levelvite.build.sourcemappath is ignored for the client bundle. Astro 5 honored the legacy path, so the regression landed invisibly with the v6 upgrade.Also:
@sentry/astro's internal config-patching logic that normally re-applies sourcemap settings is gated onsourceMapsUploadOptions.enabled === true, which we intentionally set tofalse(we use our own CLI post-build to avoid pulling in@sentry/cli, seedocs/astro.config.mjs:34). So that code path does not rescue us.Fix (in-flight)
PR #TBD (follow-up to this issue):
vite.environments.{client,ssr}.build.sourcemap: "hidden"indocs/astro.config.mjs. Locally this yields 11.mapfiles indocs/dist/_astro/(previously 0).sentry sourcemap injectandsentry sourcemap uploaderror by default when zero JS+sourcemap pairs are discovered, with--allow-emptyas an opt-in escape hatch. A silent zero-file upload/inject is almost always a bundler misconfiguration, and erroring out turns the next regression into an immediate CI failure.Related