UpdateWaitGroup
Updates a wait group’s mutable attributes: its description, its counter, its expires_at
deadline, its delete_after_finished_seconds retention, and its metadata. The name and the
completed_jobs count are immutable. counter is the total number of jobs the group waits for; it
can be raised or lowered, but not below the current completed_jobs count.
Only ACTIVE wait groups can be updated. A group that has already COMPLETED or EXPIRED is
finished and is rejected with InvalidArgument.
Pushing expires_at further into the future delays when the group is marked EXPIRED.
metadata is replaced wholesale — an update that omits metadata clears it. See
Metadata.
Safe to retry.
Request
counteris the new total number of jobs the group waits for. It may be raised or lowered, but not below the currentcompleted_jobscount. Lowering it to exactlycompleted_jobsfinishes the group asCOMPLETED.delete_after_finished_secondsis the retention period kept after the group finishes before GC deletes it. Must not be negative.expected_versionenables optimistic locking: the update is applied only if it equals the wait group’s currentversion. See Updates.
{
"namespace_name": "pipelines",
"wait_group_name": "batch_2026_06_12",
"description": "Daily ETL batch (extended)",
"counter": 110,
"expires_at": 1718323200000000000,
"delete_after_finished_seconds": 3600,
"expected_version": 1,
"metadata": { "team": "data", "pipeline": "etl", "priority": "high" }
}
Response
- Returns
NotFoundif the namespace does not exist. - Returns
NotFoundif the wait group does not exist. - Returns
InvalidArgumentif the wait group is notACTIVE(it has already completed or expired). - Returns
InvalidArgumentifexpected_versiondoes not match the wait group’s currentversion. - Returns
InvalidArgumentif the newcounteris below the currentcompleted_jobscount. last_activity_atis not affected by updates — it only advances onCompleteJobsFromWaitGroup.
{
"wait_group": {
"name": "batch_2026_06_12",
"description": "Daily ETL batch (extended)",
"status": "ACTIVE",
"counter": 110,
"completed_jobs": 73,
"version": 2,
"created_at": 1718150400000000000,
"updated_at": 1718150480000000000,
"expires_at": 1718323200000000000,
"delete_after_finished_seconds": 3600,
"finished_at": 0,
"last_activity_at": 1718150420000000000,
"metadata": { "team": "data", "pipeline": "etl", "priority": "high" }
}
}