store/s3's SweepGenerations is return nil (sandboxd/store/s3/s3.go), while the dir backend ages out superseded export generations about an hour after a re-publish. On S3 a re-publish keeps every prior generation until the whole id is deleted, and docs/deploy.md documents exactly that ("Re-publish retains prior export generations until Delete").
That is unbounded for the one workflow that re-publishes by design: a promoted template name (tp_ id) that a team re-promotes daily keeps a full VM export per promote, forever, unless someone deletes the template. Checkpoints (ck_ ids) are published once and are not affected.
Fix shape: the same grace-then-sweep contract the dir backend has, over object keys under <prefix>/<id>/exports/<gen>/: list generations, keep the current one and anything younger than the grace, delete the rest; run from the hourly sweep that already calls SweepGenerations. storetest should gain a retention test both backends run, since today only the dir behaviour is pinned. In-flight fetches that resolved an older generation are covered by the same grace the dir backend relies on.
Until then operators can bound growth with an S3 lifecycle rule on exports/ prefixes, which the deploy page should say explicitly alongside the existing rule for orphan uploads.
store/s3'sSweepGenerationsisreturn nil(sandboxd/store/s3/s3.go), while the dir backend ages out superseded export generations about an hour after a re-publish. On S3 a re-publish keeps every prior generation until the whole id is deleted, anddocs/deploy.mddocuments exactly that ("Re-publish retains prior export generations until Delete").That is unbounded for the one workflow that re-publishes by design: a promoted template name (
tp_id) that a team re-promotes daily keeps a full VM export per promote, forever, unless someone deletes the template. Checkpoints (ck_ids) are published once and are not affected.Fix shape: the same grace-then-sweep contract the dir backend has, over object keys under
<prefix>/<id>/exports/<gen>/: list generations, keep the current one and anything younger than the grace, delete the rest; run from the hourly sweep that already callsSweepGenerations.storetestshould gain a retention test both backends run, since today only the dir behaviour is pinned. In-flight fetches that resolved an older generation are covered by the same grace the dir backend relies on.Until then operators can bound growth with an S3 lifecycle rule on
exports/prefixes, which the deploy page should say explicitly alongside the existing rule for orphan uploads.