Symptom
When updating deploy markers with circleci run release update --status=RUNNING the command may fail intermittently with the following error message:
Error: failed to call releases API: Cannot update the status of a release that has already completed
Cause
circleci run release plan creates a deployment in PENDING. If that deployment stays PENDING for more than about 15 minutes without an update to RUNNING (or a terminal status), our system will automatically mark it FAILED with the reason that it timed out waiting for an initial status update.
A later circleci run release update --status=RUNNING then fails, because the release is already completed. This commonly happens when release plan runs at the start of a long job (build, image push, migrations, etc.), and RUNNING is only called after the deploy finishes. This is the intended order outlined in our documentation, however, exceeding the PENDING timeout when that work takes longer than ~15 minutes will cause a failed state.
Once the marker is RUNNING, a longer deploy is fine: RUNNING releases use a much longer timeout (on the order of 24 hours).
Resolution
Keep the time between plan and the first status update under ~15 minutes.
Option A (recommended when following “RUNNING after deploy”): Move circleci run release plan later in the job, after long build/prep steps, and immediately before the steps that change the target environment. Then call RUNNING soon after the deploy (and SUCCESS / FAILED at the end).
Option B: Leave plan early, but call circleci run release update --status=RUNNING immediately after plan, then perform the long build/deploy, then SUCCESS / FAILED. Note: In this case reporting RUNNING early marks the target version as live in the Deploys UI.
Related Notes
The same error can also appear if you update a release that is already
SUCCESS,FAILED, orCANCELED(for example on a rerun that reuses the same plan identity). Use a unique deploy name or target version per run when needed.Deploy markers track status and live version in CircleCI; they do not by themselves roll back your infrastructure. You can configure a rollback pipeline to handle this, documentation for this can be found here.
