Skip to content

fix(ci): scope family reaper to the current ref so PR runs stop deleting main's workspaces - #232

Merged
rfay merged 1 commit into
mainfrom
claude/main-test-failures-hgaez3
Nov 5, 2026
Merged

rfay merged 1 commit into
mainfrom
claude/main-test-failures-hgaez3

Conversation

@rfay

@rfay rfay commented Nov 5, 2026

Copy link
Copy Markdown
Member

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:

./scripts/ci-reap-family.sh "gc-skipto-d12-" "gc-skipto-d12-408-1"

ci-reap-family.sh deletes 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 different concurrency groups, 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

  • Add a ref tag to the six reaping jobs' WORKSPACE_NAME values (gh-*, gd-*, gd-fork-*, gc-*, gc-fork-*, gc-glfork-*):
    • pr<N> for pull requests
    • main for 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.
  • The reap step now derives its prefix from the workspace name ("${WORKSPACE_NAME%-*-*}-") instead of repeating the pattern, so the two can't drift.
  • The header comment of scripts/ci-reap-family.sh now 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

  • This PR's own CI run creates gc-skipto-d12-pr<N>-…, gc-glfork-pr<N>-… and similar workspaces, and the reap step prints the new prefix.
  • After merge, a main push creates …-main-… names. A PR run at the same time no longer touches them.

Automated Testing Overview

actionlint reports 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

…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
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.2
Preview removed because the pull request was closed.
2026-11-05 16:20 UTC

@rfay
rfay merged commit ac1ff11 into main Nov 5, 2026
22 of 23 checks passed
@rfay
rfay deleted the claude/main-test-failures-hgaez3 branch November 5, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants