Skip to content

fix(astro): Upload source maps of Astro 7's prerender build - #25309

Merged
Lms24 merged 1 commit into
developfrom
lms/fix-astro-prerender-sourcemaps
Oct 14, 2026
Merged

Lms24 merged 1 commit into
developfrom
lms/fix-astro-prerender-sourcemaps

Conversation

@Lms24

@Lms24 Lms24 commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Astro 7 writes the prerender build to a hidden .prerender folder, and our default <outDir>/**/* assets glob does not go into dot folders, so the upload found nothing and logged a warning. This PR adds <outDir>/**/.prerender/**/* to the default globs. These chunks only run at build time, so the gain is small, but it removes the warning and covers errors captured during prerendering. Also adds an astro-7-sourcemaps e2e app that checks the uploads for server and static output. Fixes #25304

@Lms24
Lms24 added this pull request to stack #25311 October 13, 2026 08:29
@Lms24 Lms24 changed the title lms/fix astro prerender sourcemaps fix(astro): Upload source maps of Astro 7's prerender build Oct 13, 2026
@Lms24
Lms24 marked this pull request as ready for review October 13, 2026 09:03
@Lms24
Lms24 requested a review from a team as a code owner October 13, 2026 09:03
@Lms24
Lms24 requested review from nicohrubec and s1gr1d and removed request for a team October 13, 2026 09:03
@Lms24 Lms24 self-assigned this Oct 13, 2026

@s1gr1d s1gr1d left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question: Do we delete the source maps again in case only Sentry enabled them in .prerender?

@Lms24

Lms24 commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

Just one question: Do we delete the source maps again in case only Sentry enabled them in .prerender?

Good question! In this case the answer is "not us", since Astro already deletes the .prerender folder after the build. Our globs, also after the update in, #25310 don't. Or rather didn't because I think we can just be a bit extra careful here and also add the .prerender glob to the deletion globs. The e2e test also asserts that no .map files remain in the dist folder.

Astro 7 writes the prerender build to a hidden `.prerender` folder, which
the default `<outDir>/**/*` assets glob does not enter. The upload found no
files and logged "Didn't find any matching sources for debug ID upload".
Add an explicit `<outDir>/**/.prerender/**/*` glob to the defaults.

Add an `astro-7-sourcemaps` e2e app that checks what gets uploaded for
server and static output.

Fixes #25304
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Lms24
Lms24 force-pushed the lms/fix-astro-prerender-sourcemaps branch from 2499c99 to 9afeeb5 Compare October 13, 2026 14:08
@Lms24
Lms24 merged commit d57cce7 into develop Oct 14, 2026
50 checks passed
@Lms24
Lms24 deleted the lms/fix-astro-prerender-sourcemaps branch October 14, 2026 09:07
nicohrubec pushed a commit that referenced this pull request Oct 16, 2026
Backport of: #25309

## Differences to the original PR

- `packages/astro/src/integration/index.ts`: v10 still falls back to the
deprecated `uploadOptions.assets` before the default globs, so that
fallback is kept in front of the new `getSourcemapsAssetsGlobs(config)`.

This branch was prepared by the v10 backport automation, which was
blocked at PR creation; it's opened manually now.

<!-- junior-request-attribution:start -->
via **Jan Peer Stöcklmair**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3A83fc948beed4fb12a54d41cb -->

--

[View Junior Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A83fc948beed4fb12a54d41cb/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Jan Peer Stöcklmair <jan.peer@sentry.io>
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Oct 17, 2026
| datasource | package             | from  | to     |
| ---------- | ------------------- | ----- | ------ |
| npm        | @sentry/vite-plugin | 5.4.1 | 11.8.0 |


## [v11.8.0](https://github.com/getsentry/sentry-javascript/blob/HEAD/CHANGELOG.md#1180)

##### Important Changes

- **feat(bundler-plugins): Release `@sentry/webpack-plugin`, `@sentry/vite-plugin`, `@sentry/rollup-plugin` and `@sentry/esbuild-plugin` from the SDK repository ([#25095](getsentry/sentry-javascript#25095

  The four standalone bundler plugins now release together with the SDK, so their version jumps from 5.4.1 to the SDK version. Each package re-exports the matching `@sentry/bundler-plugins` entry point, which we recommend for new projects. The plugin options do not change, but the update brings these breaking changes:

  - Node.js 20.19.0 or higher is required.
  - `@sentry/webpack-plugin` requires webpack 5.1 or higher. The `@sentry/webpack-plugin/webpack5` entry point still works and exports the same plugin as `@sentry/webpack-plugin`.
  - The plugins use the `sentry` CLI SDK instead of `@sentry/cli`. Sentry self-hosted 26.4.2 or higher is supported. Lower versions may continue to work.
  - Deploys that the plugins create on Vercel use the value of `VERCEL_TARGET_ENV` (`production`, `preview` or a custom name) as their environment, instead of `vercel-production` or `vercel-preview`. To keep the old value, set `release.deploy.env`.

- **feat(server-utils): Instrument the OpenAI decisions API as `gen_ai.decide` spans ([#25285](getsentry/sentry-javascript#25285

  OpenAI `decisions.create` calls now create `gen_ai.decide` spans.

##### Other Changes

- feat(core): Support SuppressedError in LinkedErrors integration ([#25246](getsentry/sentry-javascript#25246))
- fix(astro): Delete generated source maps for static output ([#25310](getsentry/sentry-javascript#25310))
- fix(astro): Upload source maps of Astro 7's prerender build ([#25309](getsentry/sentry-javascript#25309))
- fix(browser): Apply `urlQueryParams` to the Referer header ([#25324](getsentry/sentry-javascript#25324))
- fix(cloudflare): auto-instrument when wrangler `main` is a package ([#25343](getsentry/sentry-javascript#25343))
- fix(hono): Expose runtime-specific SDK options ([#25290](getsentry/sentry-javascript#25290))
- fix(node): Instrument Prisma 8 CollectionBase from rc.15 ([#25301](getsentry/sentry-javascript#25301))
- fix(nuxt): Skip 3xx/4xx Nuxt errors in the vue:error hook ([#25341](getsentry/sentry-javascript#25341))
- fix(server-utils): Read pi-durable 1.2.0 tool results from `output` ([#25312](getsentry/sentry-javascript#25312))
- fix(server-utils): Transform modules once when two Sentry Vite plugins add orchestrion ([#25043](getsentry/sentry-javascript#25043))
- fix(sveltekit): add op and origin to Kit's `sveltekit.endpoint` span ([#25376](getsentry/sentry-javascript#25376))
- fix(tanstackstart-react): Keep parametrized route names in Nitro 3 builds ([#25307](getsentry/sentry-javascript#25307))
- fix(tanstackstart-react): Rewrite source paths of split route modules ([#25361](getsentry/sentry-javascript#25361))

<details>
  <summary> <strong>Internal Changes</strong> </summary>

- chore: Add external contributor to CHANGELOG.md ([#25375](getsentry/sentry-javascript#25375))
- ci: Install the pnpm version that Volta pins ([#25287](getsentry/sentry-javascript#25287))
- license: Add cli FSL notice to package licenses ([#25314](getsentry/sentry-javascript#25314))
- ref(core): use shared MCP attribute conventions ([#25059](getsentry/sentry-javascript#25059))
- ref(tanstackstart-react): Reuse shared component annotation options ([#25313](getsentry/sentry-javascript#25313))
- test(browser): Keep whitespace text out of the handlers-lcp page ([#25280](getsentry/sentry-javascript#25280))
- test(bun): Restore [@sentry/core](https://github.com/sentry/core) spies after the Bun.serve tests ([#25276](getsentry/sentry-javascript#25276))
- test(bundler-plugins): Disable CLI telemetry in the CLI contract tests ([#25308](getsentry/sentry-javascript#25308))
- test(e2e): Add node-openai-decisions-send-to-sentry test app ([#25331](getsentry/sentry-javascript#25331))
- test(e2e): Add node-openai-send-to-sentry test app ([#24824](getsentry/sentry-javascript#24824))
- test(e2e): Add nuxt-5-sourcemaps test ([#25268](getsentry/sentry-javascript#25268))
- test(e2e): Inherit root Volta config in all e2e test apps ([#25369](getsentry/sentry-javascript#25369))
- test(e2e): Use an external host address for the Lambda DSN on loopback hostnames ([#25282](getsentry/sentry-javascript#25282))
- test(nextjs): Run nextjs-16-tunnel on Cloudflare ([#25161](getsentry/sentry-javascript#25161))
- test(nextjs): Switch DEBUG_BUILD with a getter instead of re-importing the SDK ([#25279](getsentry/sentry-javascript#25279))
- test(node): Await the child exit in the "should exit" integration tests ([#25277](getsentry/sentry-javascript#25277))
- test(node): Cover ioredis v6 in the diagnostics_channel suite ([#25300](getsentry/sentry-javascript#25300))
- test(node): Cover LangChain model calls made from a tool without config ([#25326](getsentry/sentry-javascript#25326))
- test(node): Log slow and failed Docker Compose starts in integration tests ([#25278](getsentry/sentry-javascript#25278))
- test(node): Unflake captureMessage with_level test ([#25358](getsentry/sentry-javascript#25358))
- test(sveltekit): Pin rollup to 4.64.5 ([#25328](getsentry/sentry-javascript#25328))

</details>

Work in this release was contributed by [@kunal649](https://github.com/kunal649) and [@mketiku](https://github.com/mketiku). Thank you for your contributions!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants