Repository navigation
fix(ci): scope family reaper to the current ref so PR runs stop deleting main's workspaces - #232
Merged
Merged
Conversation
…ing main's workspaces ci-reap-family.sh deletes every ci-bot workspace whose name starts with the family prefix. The prefix held only the matrix cell (e.g. gc-skipto-d12-), so a PR run reaped main's in-flight workspace for the same cell. Main run 407 lost gc-skipto-d12-407-1 and gc-glfork-407-1 mid-test to PR run 408's reap step. Add a ref tag to the six reaping jobs' workspace names: pr<N> for pull requests, main for main, x<run_number> elsewhere (unique, so nothing is reaped; the scheduled janitor handles leftovers). The reap step now derives its prefix from WORKSPACE_NAME, so the two cannot drift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrTUMvCWUwNhA8aJhsJyGr
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
Main's Drupal Contrib Integration Tests run 407 failed in two jobs ("skipto D12 (plain, GH)" and "ui_icons issue fork"). Neither failure came from a test: each workspace was deleted mid-test (
error: workspace "gc-skipto-d12-407-1" is deleted).PR run 408 started a few minutes later. Its "Reap predecessor workspaces" step (15:11:25–15:12:06) ran:
ci-reap-family.shdeletes every ci-bot workspace that starts with the family prefix. The prefix held only the matrix cell, not the ref, so the PR run took main's in-flight workspace for a cancelled predecessor and deleted it. Runs on different refs are in differentconcurrencygroups, so they overlap by design. Any PR, main push or schedule run could hit this, across all six families that use the reaper.How This PR Solves The Issue
WORKSPACE_NAMEvalues (gh-*,gd-*,gd-fork-*,gc-*,gc-fork-*,gc-glfork-*):pr<N>for pull requestsmainfor push, schedule or dispatch on main (all share one concurrency group, so reaping across them is correct)x<run_number>for a dispatch on any other branch. The tag is unique, so the reaper finds nothing to delete and the scheduled janitor (ci-reap-staging.sh) cleans up."${WORKSPACE_NAME%-*-*}-") instead of repeating the pattern, so the two can't drift.scripts/ci-reap-family.shnow documents the ref-tag requirement.Example names:
gc-skipto-d12-pr231-409-1,gc-glfork-main-410-1. The longest realistic name,gc-pathauto-d11-pr9999-9999-9, is 29 characters, under Coder's 32-character limit.Manual Testing Instructions
gc-skipto-d12-pr<N>-…,gc-glfork-pr<N>-…and similar workspaces, and the reap step prints the new prefix.…-main-…names. A PR run at the same time no longer touches them.Automated Testing Overview
actionlintreports no new findings on the three changed workflows; the pre-existing findings are identical before and after. No Terraform changed.Release/Deployment Notes
CI only. Existing workspaces with the old names are left alone by the new prefixes; the scheduled janitor removes them by age.
🤖 Generated with Claude Code
https://claude.ai/code/session_01UrTUMvCWUwNhA8aJhsJyGr