Build cache ignores maxResponseBytes, potentially reusing an outdated response limit
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- build-system
Direzione di ricerca
Inizia in packages/dynamic-apps-core/src/build.ts tracciando canonicalDeploymentHash(), l'identità del packaging e artifactCache.get(buildId). Poi leggi directRunnerSource() in packages/dynamic-apps-core/src/runtime.ts e aggiungi una copertura di regressione per i valori di maxResponseBytes modificati, ripetuti ed equivalenti al valore predefinito. Il lavoro è completato quando i limiti effettivi producono il comportamento previsto delle chiavi della cache e un limite modificato viene utilizzato da un nuovo artefatto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Build cache ignores maxResponseBytes, potentially reusing an outdated response limit
Summary
buildAppRelease() embeds config.maxResponseBytes in the generated application wrapper, but does not include this setting in the build-cache key.
Changing the response limit while keeping application source unchanged therefore produces the same cache key. If a cached artifact exists, the build can reuse the wrapper containing the previous limit.
Code evidence
In packages/dynamic-apps-core/src/build.ts:
canonicalDeploymentHash()receives the source files, entrypoint, build flag, and packaging identity.- The packaging identity does not include
config.maxResponseBytes. artifactCache.get(buildId)can return an existing artifact before a new wrapper is generated.- When a build does run,
directRunnerSource()receivesconfig.maxResponseBytes.
In packages/dynamic-apps-core/src/runtime.ts, directRunnerSource() embeds that value into the response-size checks.
Sources:
- https://github.com/rivet-dev/dynamic-apps/blob/efcee03d7dbe388ffaf0231c1beb9316b84f7447/packages/dynamic-apps-core/src/build.ts
- https://github.com/rivet-dev/dynamic-apps/blob/efcee03d7dbe388ffaf0231c1beb9316b84f7447/packages/dynamic-apps-core/src/runtime.ts
Reproduction scenario to verify
- Build an application with
config.maxResponseBytesset to1024, using an artifact cache. - Keep the source files and other build inputs unchanged.
- Build it again with
config.maxResponseBytesset to2048, using the same cache. - Compare the cache keys and check whether the second build reuses the first artifact.
- Serve a response containing 1536 bytes.
Expected behavior
Changing the response limit should produce a different cache key and a new artifact containing the updated limit.
The second deployment should allow the 1536-byte response.
Equivalent effective limits, including the default and its explicitly specified value, should retain the same cache key.
Suspected behavior
Both configurations produce the same cache key. The second build can return the cached artifact containing the 1024-byte limit, causing the response to remain rejected.
The reverse change could also retain an older, larger limit after the configured limit is reduced.
Suggested fix
Include the effective maxResponseBytes value in the build-cache identity.
Add regression coverage verifying that:
- Different response limits produce different cache keys.
- Repeated builds with the same effective limit retain the same key.
- An omitted limit and the explicit default produce the same key.
- Lingua principale
- TypeScript
- Stelle
- 1k
- Fork
- 54
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna 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 rivet-dev/dynamic-apps
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
rivet-dev/dynamic-apps#280 · 2 commenti ·
-
Make agentOS runtime classifier content-based (match Linux exec semantics), not extension-basedForse già presa @mittal-parth l’ha presa 25 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
rivet-dev/dynamic-apps#275 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
rivet-dev/dynamic-apps#272 ·
-
Treat the WASM/WASI build target as cfg(unix) so filesystem tools need no per-tool mode-bit patchesAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
rivet-dev/dynamic-apps#271 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
rivet-dev/dynamic-apps#178 ·
Tutte le issue di rivet-dev/dynamic-apps
Issue simili
-
[Feature]: [P3] engine-rs: the package source hash should ignore line endings and untracked filesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
maniator/verticopolis#880 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
siyuan-note/siyuan#20353 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
black-forest-labs/skills#17 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Albert-Weasker/niubigeo#168 ·
I maintainer di solito rispondono entro 1 giorno