Skip to content

spawn reaper deploy fails redeploying an existing reaper: UpdateFunctionConfiguration 409 while the code update is in progress #1084

Closed

Description

@scttfrdmn

Re-running spawn reaper deploy against an already-deployed reaper (dev account, us-west-2, v0.121.0 → v0.131.0) failed:

reaperdeploy: update function configuration: ... StatusCode: 409 ... ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-west-2:...:function:spawn-ttl-reaper-selfscan

pkg/reaperdeploy/deployer.go calls UpdateFunctionCode and then immediately UpdateFunctionConfiguration. Lambda processes a code update asynchronously (LastUpdateStatus: InProgress) and rejects any other update until it finishes, so the second call races the first and, in practice, loses.

Effect: the deploy aborts half-way. The new code is live, but the configuration update and every later step (schedule, spawn:version tag) never run, so spawn reaper status keeps reporting the old version. The armed/disarmed state is unaffected (the configuration it failed to write was the preserved one).

This is the upgrade path the CLI itself recommends (spawn reaper help: "Bring them together by re-running 'spawn reaper deploy'" — #654), so every self-hosted reaper upgrade hits it.

Fix: wait for LastUpdateStatus to leave InProgress after the code update (bounded), and fail with the status reason if it ends Failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions