`release.inject` gives startup chunks new file names on every commit
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, typescript, vite, webpack
- Ambito
- build-system, performance
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 8.8k
- Fork
- 1.9k
- Merge medio
- 1g 8h
- PR unite (30g)
- 744
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-javascript
-
AWS Lambda Waiting for: Product Owner
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
getsentry/sentry-javascript#26910 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Only create Nuxt database and storage spans when there is a parent spanForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaImprovement Nuxt
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
getsentry/sentry-javascript#25805 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Only create Cloudflare storage and D1 db spans when there is a parent spanForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaCloudflare Workers Improvement Spans
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-javascript#25804 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Core Feature: Typescript Meta: Breaking
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
getsentry/sentry-javascript#25286 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
javascript
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
getsentry/sentry-javascript#24200 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di getsentry/sentry-javascript
Issue simili
-
Postgres upgrade golden leaves fixture URL query parameters in the expected output comparisonAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
garrytan/gbrain#10437 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Bedrock "Too many tokens" throttle is not auto-retried, unlike "Too many requests"Forse già presa @acmerfight l’ha presa oggi. Apertauntriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
earendil-works/pi#12573 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
agentes-chat/agentes-chat#1506 ·
I maintainer di solito rispondono entro 1 giorno
-
comp/desktop desktop/files os/windows P2 type/perf
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
NousResearch/hermes-agent#160359 ·
I maintainer di solito rispondono entro 1 giorno
-
Missing repro Platform: Android
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
software-mansion/react-native-reanimated#11554 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno