You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reaper InstanceRoles would delete a spawn-instance-* role that an enabled schedule still names #1378
Found while deciding whether to arm REAPER_INSTANCE_ROLES after v0.147.0 (#1300/#1321). It is currently report, and the first report lists 13 roles.
pkg/instancerole deletes a spawn-instance-* role once no pending-to-stopped instance holds its profile and it has been unused for Grace (24 h, instancerole.go:110). It does not consult schedules. spawn schedule create accepts a spawn-instance-* profile: refuseUnpassableDetachedProfiles (cmd/schedule.go:589) lets that prefix through by design (#1331), through --iam-policy/--s3-* or a row's iam_role. A schedule that fires weekly or monthly leaves its role idle between firings, so an armed reaper would delete it, and the next firing would fail every member at RunInstances with an invalid profile.
Pool and batch-queue roles are unaffected, because their workers hold the profile while they run.
Fix: before deciding, collect every instance-profile or role name referenced by an enabled schedule's stored params (scheduler-handler's record + S3ParamsKey) and treat those as in use. Make it fail closed: if the schedules can't be read, delete nothing. Do the same in spawn cleanup. Gate it with a schedule-referenced idle role that is kept, and an unreadable schedules table that deletes nothing.
Until this ships, keep InstanceRoles=report. EmptyBuckets and PoolQueues don't depend on it.
Activity
fix(reaper): keep spawn-instance-* roles an enabled schedule still na…
fix(reaper): keep spawn-instance-* roles an enabled schedule still na…