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
Schedule params expire after 7 days (bucket lifecycle), so recurring schedules fail after their first week #1382
pkg/staging gives every schedules bucket a lifecycle rule that expires the schedule params after 7 days, so a recurring schedule cannot fire successfully after its first week.
pkg/staging/staging.goensureBucket (used by resolveSchedulesBucket, i.e. by UploadScheduleParams), on creating spawn-schedules-<region> / spawn-schedules-<account>-<region>, puts lifecycle rule expire-schedules: Prefix: "schedules/", Expiration.Days: 7. The comment above it reads "7-day lifecycle rule — queue configs are ephemeral". It looks copied from the queue-config path.
UploadScheduleParams writes the params to schedules/<schedule id>/params.yaml in that bucket. That's the prefix the rule expires.
lambda/scheduler-handlerdownloadParams reads that object on every firing (handler step 4). Once it has expired, every firing goes to recordError(... "load params: get object: NoSuchKey").
spawn schedule create --cron accepts any cadence, and nothing re-uploads the params.
So a daily schedule gets about 7 firings, and a weekly or monthly one gets at most one. Not reproduced live (no AWS calls). The claim is from the code path above.
Interaction with #1378: the per-task role sweep now fails closed when an active schedule's params object is missing. It deletes no role that run, logs the schedule ID, and counts instance_roles_references_unreadable. Until this is fixed, any active recurring schedule older than 7 days stops the reaper (and spawn cleanup --instance-roles) from deleting any role, until someone cancels the schedule.
Related, same lifetime class:scheduler.Client.SaveSchedule sets the record's DynamoDB ttl to now+90 days. A recurring schedule's record is auto-deleted after 90 days while its EventBridge schedule keeps firing ("schedule not found" each time). That EventBridge schedule is left with nothing that deletes it.
Suggested fix: don't expire schedules/ params while their schedule exists. Delete the params object in spawn schedule cancel / DeleteSchedule instead (it is the named deleter). Either refresh the record TTL on each firing or drop it, and have cancel/delete remove the EventBridge schedule. Existing buckets keep the rule until it is removed, so the fix needs a migration step (PutBucketLifecycleConfiguration without the rule).
Live check (2026-10-28, infra account, read-only):
The three production buckets spawn-schedules-{us-east-1,us-west-2,eu-west-1} carry a different rule from the one in the code: DeleteOldScheduleParams, no prefix (whole bucket), Expiration 90 days. They predate pkg/staging's expire-schedules (7 days, schedules/). So in production a recurring schedule loses its params after 90 days. A bucket newly created by pkg/staging would lose them after 7. Both are the same bug, and the fix must remove both rules (the migration step).
The spawn-schedules table holds 0 items, so no live schedule is affected today.
Activity
scttfrdmn commentedon Oct 28, 2026
Live check (2026-10-28, infra account, read-only):
spawn-schedules-{us-east-1,us-west-2,eu-west-1}carry a different rule from the one in the code:DeleteOldScheduleParams, no prefix (whole bucket), Expiration 90 days. They predatepkg/staging'sexpire-schedules(7 days,schedules/). So in production a recurring schedule loses its params after 90 days. A bucket newly created bypkg/stagingwould lose them after 7. Both are the same bug, and the fix must remove both rules (the migration step).spawn-schedulestable holds 0 items, so no live schedule is affected today.fix(schedule): schedule lifetime and control-plane region (#1382, #1383)