`release.inject` gives startup chunks new file names on every commit
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, typescript, vite, webpack
- Bereich
- build-system, performance
Rechercherichtung
Start by tracing how release.inject is applied to startup chunks in the bundler plugins, then compare the Vite transformIndexHtml and webpack HTML plugin entry points mentioned in the issue. Check how release values reach the SDK at runtime and how existing tests cover injected releases and output hashes. Done means the selected behavior avoids changing unchanged chunk hashes on each commit, with tests and documentation covering the caching effect.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem Statement
release.inject defaults to true, and release.name defaults to the current commit. So every chunk that gets the release snippet gets a new content hash on every commit, even when its code did not change.
Since #25541 this only hits startup chunks, but those are exactly the files every returning visitor needs first. Other chunks import them by their hashed file names, so the renames spread from there.
On @sentry/nuxt 10.47, a deploy that changed one image renamed 140 of 147 client files. release: { inject: false } fixed it.
This is a very weird default. A bundler plugin should not break the bundler's content hashing unless you ask it to, and most users will never notice that every deploy throws away their users' cache.
Solution Brainstorm
- Keep the release out of content-hashed files: inject it into the HTML (
transformIndexHtmlin Vite, the HTML plugin in webpack) or into one small unhashed file. - Or default
release.injecttofalsewhen the SDK already gets the release some other way (Sentry.init({ release }), framework runtime config). - Either way, document the caching cost on
release.inject.
Debug IDs are not the problem: they come from the file content, so they don't change the hashes.
Additional Context
Same problem in the old repo: https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/680 (closed, but people still hit it there).
Workaround: release: { inject: false }, and pass release to Sentry.init at runtime.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 8.8k
- Forks
- 1.9k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 744
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus getsentry/sentry-javascript
-
AWS Lambda Waiting for: Product Owner
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
getsentry/sentry-javascript#26910 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Only create Nuxt database and storage spans when there is a parent spanEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. OffenImprovement Nuxt
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
getsentry/sentry-javascript#25805 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Only create Cloudflare storage and D1 db spans when there is a parent spanEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. OffenCloudflare Workers Improvement Spans
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
getsentry/sentry-javascript#25804 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Core Feature: Typescript Meta: Breaking
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
getsentry/sentry-javascript#25286 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
javascript
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
getsentry/sentry-javascript#24200 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in getsentry/sentry-javascript
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
garrytan/gbrain#10437 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bedrock "Too many tokens" throttle is not auto-retried, unlike "Too many requests"Evtl. vergeben @acmerfight hat das heute übernommen. Offenuntriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
earendil-works/pi#12573 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
agentes-chat/agentes-chat#1506 ·
Maintainer antworten meist innerhalb von 1 Tag
-
comp/desktop desktop/files os/windows P2 type/perf
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
NousResearch/hermes-agent#160359 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Missing repro Platform: Android
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
software-mansion/react-native-reanimated#11554 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag