Skip to content

store/s3: superseded export generations are never swept #183

Description

@CMGS

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions