The remote cache keeps one entry per task, so branches overwrite each other's results

Aperta
#42 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Read the remote cache server API and upload flow alongside the linked issues voidzero-dev/vite-task#713 and #755. The issue describes why one entry per task causes branch uploads to overwrite each other, and why input digests alone cannot cover dynamically detected inputs. Explore an API design that can return multiple candidates for a key; done means entries for different input states coexist and runs can hit a matching entry from another branch.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A remote cache entry is stored under a key made from the task's command, arguments, env, and input/output globs. The contents of the input files aren't part of the key. They're checked after the entry is fetched.

So all input states of a task share one entry. When main and PR branches run the same task with different sources, each upload replaces the previous one, and a fetch hits only if the latest upload came from the same inputs. The more branches share a remote cache, the fewer hits each gets.

The secondary key doesn't help: it only identifies the task, and a fallback through it is used only to explain the miss.

Adding a digest of the input files to the key only covers tasks with explicit input globs. By default, inputs are detected while the task runs, so they aren't known at lookup time. Covering them needs a lookup that can return several candidate entries for one key.

Expected: entries for different input states coexist, so a run can hit an entry uploaded from another branch.

Affects the server API design (voidzero-dev/vite-task#713) and remote cache uploads (voidzero-dev/vite-task#755).

Lingua principale
TypeScript
Stelle
8
Fork
0
Merge medio
2g 14h
PR unite (30g)
38

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di voidzero-dev/vite-plus-remote-cache-cloudflare

Tutte le issue di voidzero-dev/vite-plus-remote-cache-cloudflare

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.