Extract build polling and share between bk build watch and bk preflight#714
Draft
matthewborden wants to merge 5 commits intomainfrom
Draft
Extract build polling and share between bk build watch and bk preflight#714matthewborden wants to merge 5 commits intomainfrom
bk build watch and bk preflight#714matthewborden wants to merge 5 commits intomainfrom
Conversation
This implements the most basic polling, showing only the job count grouped by state.
Amp-Thread-ID: https://ampcode.com/threads/T-019d1e79-6e14-75c6-a853-c4465dda8a6e Co-authored-by: Amp <amp@ampcode.com>
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.
This extracts the build polling loop from
bk build watchinto a sharedinternal/build/watchpackage and reuses it inbk preflight.Previously
bk build watchhad its own inline polling loop with no error tolerance, andbk preflightwould create the build and exit immediately. With this change:bk preflightnow watches the build until completion by default (--no-watchto disable)passedfailed,timed_outcanceledrunning,canceling,timing_outscheduled,assigned,accepted,reservedblocked,blocked_failedskipped,brokenwaiting,waiting_failed,pending,limited,limiting,platform_limited,platform_limiting,expiredUnknown states, and non-command jobs are ignored.
Verification
bk build watch -p <pipeline>and confirm it behaves as before.bk preflight -p <pipeline>and confirm it polls and prints job state updates until the build finishes.bk preflight -p <pipeline> --no-watchand confirm it exits after creating the build.mise run test