`release.inject` gives startup chunks new file names on every commit
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript, typescript, vite, webpack
- Domínio
- build-system, performance
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 8.8k
- Forks
- 1.9k
- Merge médio
- 1d 8h
- PRs com merge (30d)
- 744
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de getsentry/sentry-javascript
-
AWS Lambda Waiting for: Product Owner
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
getsentry/sentry-javascript#26910 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Only create Nuxt database and storage spans when there is a parent spanTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. AbertaImprovement Nuxt
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
getsentry/sentry-javascript#25805 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
Only create Cloudflare storage and D1 db spans when there is a parent spanTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. AbertaCloudflare Workers Improvement Spans
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
getsentry/sentry-javascript#25804 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Core Feature: Typescript Meta: Breaking
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
getsentry/sentry-javascript#25286 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
javascript
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
getsentry/sentry-javascript#24200 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de getsentry/sentry-javascript
Issues semelhantes
-
Postgres upgrade golden leaves fixture URL query parameters in the expected output comparisonAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
garrytan/gbrain#10437 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Bedrock "Too many tokens" throttle is not auto-retried, unlike "Too many requests"Talvez já em andamento @acmerfight assumiu hoje. Abertauntriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
earendil-works/pi#12573 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
agentes-chat/agentes-chat#1506 ·
Mantenedores costumam responder em até 1 dia
-
comp/desktop desktop/files os/windows P2 type/perf
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
NousResearch/hermes-agent#160359 ·
Mantenedores costumam responder em até 1 dia
-
Missing repro Platform: Android
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
software-mansion/react-native-reanimated#11554 · 1 comentário ·
Mantenedores costumam responder em até 1 dia