Cap previews at five and reap them nightly #307

Closed
opened 2026-10-09 09:19:54 +00:00 by root · 6 comments
root commented 2026-10-09 09:19:54 +00:00 (Migrated from gitlab.core-project.space)

Imported from GitHub amaurycoudr/chess-project#307, opened by @amaurycoudr on 2026-10-09 09:19 UTC.
Closed on GitHub on 2026-10-09 12:20 UTC as completed.


Parent

#303

What to build

Previews can never crowd out production: at most five run at once, and nothing leaks when a close event is missed.

Before deploying a new preview while five run, the preview workflow removes the one deployed longest ago, read from the deploy-time label. A redeploy of an existing preview does not count as a sixth. A nightly scheduled workflow lists the chess-pr-* stacks, removes those whose PR is no longer open, then prunes images no container uses.

Seam: Workflow post-conditions

Acceptance criteria

  • Deploying a sixth preview removes the one deployed longest ago, and the run ends by checking at most five chess-pr-* stacks remain
  • Redeploying one of five existing previews removes none
  • The nightly run removes a stack whose PR is closed and keeps those whose PR is open, then checks every remaining stack has an open PR
  • The nightly run prunes unused images and never touches the running production image or the proxy
  • The nightly run can also be started by hand
> _Imported from GitHub [amaurycoudr/chess-project#307](https://github.com/amaurycoudr/chess-project/issues/307), opened by [@amaurycoudr](https://github.com/amaurycoudr) on 2026-10-09 09:19 UTC._ > _Closed on GitHub on 2026-10-09 12:20 UTC as completed._ <!-- github-issue:307 --> --- ## Parent #303 ## What to build Previews can never crowd out production: at most five run at once, and nothing leaks when a close event is missed. Before deploying a new preview while five run, the preview workflow removes the one deployed longest ago, read from the deploy-time label. A redeploy of an existing preview does not count as a sixth. A nightly scheduled workflow lists the `chess-pr-*` stacks, removes those whose PR is no longer open, then prunes images no container uses. Seam: Workflow post-conditions ## Acceptance criteria - [ ] Deploying a sixth preview removes the one deployed longest ago, and the run ends by checking at most five `chess-pr-*` stacks remain - [ ] Redeploying one of five existing previews removes none - [ ] The nightly run removes a stack whose PR is closed and keeps those whose PR is open, then checks every remaining stack has an open PR - [ ] The nightly run prunes unused images and never touches the running production image or the proxy - [ ] The nightly run can also be started by hand
root commented 2026-10-09 09:19:54 +00:00 (Migrated from gitlab.core-project.space)

GitHub issue relations, imported as "related" links (GitLab CE has no sub-issues or blocking links).

  • Parent (sub-issue of): #303
  • Blocked by: #306
> _GitHub issue relations, imported as "related" links (GitLab CE has no sub-issues or blocking links)._ <!-- github-relations --> - Parent (sub-issue of): #303 - Blocked by: #306
root (Migrated from gitlab.core-project.space) closed this issue 2026-10-09 12:20:44 +00:00
root commented 2026-10-13 08:41:06 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #303

mentioned in issue #303
root commented 2026-10-13 08:41:07 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #306

mentioned in issue #306
root commented 2026-10-13 08:42:07 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #303

marked this issue as related to #303
root commented 2026-10-13 08:42:11 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #306

marked this issue as related to #306
root commented 2026-10-13 10:28:28 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 1ece286732

mentioned in commit 1ece2867320fc42cc56acd734f97e608a37592a6
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Depends on
Reference
amaurycoudr/chess-project#307
No description provided.