Skip to content

Add --wait and --timeout to pipelines start-update - #7878

Draft
camielstee-db wants to merge 2 commits into
databricks:mainfrom
camielstee-db:pipelines-start-update-wait
Draft

camielstee-db wants to merge 2 commits into
databricks:mainfrom
camielstee-db:pipelines-start-update-wait

Conversation

@camielstee-db

Copy link
Copy Markdown

Changes

  • databricks pipelines start-update gets opt-in --wait and --timeout. With --wait it prints {"update_id": ...} as before, logs the update's progress events to stderr, and returns when the update ends. It exits non-zero if the update is canceled, or if it fails, after printing the update's error events. --timeout stops waiting and leaves the update running; the default is no limit, as for pipelines test --timeout.
  • Without --wait the command is unchanged.
  • The bundle pipeline runner's poll loop moves, unchanged, into run.WaitForPipelineUpdate(ctx, w, pipelineID, updateID), which bundle run / pipelines run and the new flag share.
  • The override gets the update ID by wrapping w.Pipelines.StartUpdate, so the generated --json, argument and prompt handling and the output stay as generated.

Open question for reviewers: agents also pass --no-wait. Should start-update accept it as an explicit no-op? It is not added here.

Why

start-update returns as soon as the update is created, so agents that create pipelines through the API hand-roll polling loops over get-update that overrun their tool timeouts or miss failures; pipelines run and bundle run wait, but only for bundle resources. A wait_for_state annotation on the API would make waiting the default for every caller and change the SDK signatures, so this adds an opt-in flag instead.

Tests

  • New acceptance tests in acceptance/pipelines/start-update/: default output unchanged, --wait on a completed update, on a failed update (error events printed, non-zero exit), --timeout on a running update, and flag validation.
  • The existing bundle run and pipelines run acceptance tests cover the moved poll loop; the full go test ./acceptance suite passes.

AI;DR: opt-in start-update --wait/--timeout that reuses the bundle runner's poll loop; defaults unchanged.

This pull request and its description were written by Isaac.

camiel.steenstra and others added 2 commits November 22, 2026 20:00
`databricks pipelines start-update --wait` blocks until the update ends,
logging its progress events, and fails with the update's error events if
the update fails or is canceled. `--timeout` stops waiting and leaves the
update running. Without --wait the command behaves as before.

The poll loop moves out of the bundle pipeline runner into
run.WaitForPipelineUpdate so that both use it.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! This pull request was opened from a fork.

If you're a member of the Databricks organization, please request access to the cli-contrib team and open your pull request from a branch in this repository instead of a fork — fork PRs don't run integration tests automatically and have reduced CI access.

If you're an external contributor, no action is needed; a maintainer will review your pull request.

@github-actions github-actions Bot added the DABs DABs related issues label Nov 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 7878
  • Commit SHA: da9be303545622d3adbf24291a85b308385ae8e4

Checks will be approved automatically on success.

This branch has not been deployed

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

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant