Repository navigation
Add --wait and --timeout to pipelines start-update - #7878
Draft
camielstee-db wants to merge 2 commits into
Draft
camielstee-db wants to merge 2 commits into
camielstee-db wants to merge 2 commits into
Conversation
`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>
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 If you're an external contributor, no action is needed; a maintainer will review your pull request. |
Contributor
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
databricks pipelines start-updategets opt-in--waitand--timeout. With--waitit 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.--timeoutstops waiting and leaves the update running; the default is no limit, as forpipelines test --timeout.--waitthe command is unchanged.run.WaitForPipelineUpdate(ctx, w, pipelineID, updateID), whichbundle run/pipelines runand the new flag share.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. Shouldstart-updateaccept it as an explicit no-op? It is not added here.Why
start-updatereturns as soon as the update is created, so agents that create pipelines through the API hand-roll polling loops overget-updatethat overrun their tool timeouts or miss failures;pipelines runandbundle runwait, but only for bundle resources. Await_for_stateannotation 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
acceptance/pipelines/start-update/: default output unchanged,--waiton a completed update, on a failed update (error events printed, non-zero exit),--timeouton a running update, and flag validation.bundle runandpipelines runacceptance tests cover the moved poll loop; the fullgo test ./acceptancesuite passes.AI;DR: opt-in
start-update --wait/--timeoutthat reuses the bundle runner's poll loop; defaults unchanged.This pull request and its description were written by Isaac.