Repository navigation
air: Skip purged runs in air list --all-status - #7525
Closed
abdulkareem-db wants to merge 2 commits into
Closed
abdulkareem-db wants to merge 2 commits into
abdulkareem-db wants to merge 2 commits into
Conversation
runs/get reports a purged run as 400 INVALID_PARAMETER_VALUE "Run <id>
does not exist.", which the SDK maps to ErrResourceDoesNotExist.
hydrateJobRuns only dropped 403/404, so one purged run failed the whole
listing. Drop ErrResourceDoesNotExist too, and stop wrapping the error a
second time ("failed to get run X: failed to get run X: ...").
Fixes CNXT-2565.
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. |
Author
|
Closing as a duplicate of #7523, which has the same change. |
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 air list --all-statusno longer fails when one of the listed runs has been purged.hydrateJobRunsnow drops runs thatruns/getreports as not existing, the same way it already drops runs the caller can't view (403) or that return 404. The error message for other per-run failures no longer repeats the "failed to get run" prefix.Why
For a purged run,
runs/getreturns HTTP 400INVALID_PARAMETER_VALUE"Run does not exist." rather than 404. The SDK already maps this response toapierr.ErrResourceDoesNotExist, buthydrateJobRunsonly checked for 403/404 status codes. One purged run therefore failed the whole errgroup, soair list --all-statusexited 1 with nothing listed:The run ID in the error varied between attempts because whichever concurrent fetch failed first cancelled the batch. The prefix was doubled because
fetchJobRunalready wraps the error andhydrateJobRunswrapped it again.Other errors (auth, 5xx, other 400s) still fail the listing as before. The existing 403/404 status-code check is unchanged.
Tests
cmd/air/joblist_test.goagainst anhttptestserver, so the SDK's error mapping is exercised:INVALID_PARAMETER_VALUEwith a different message still fail, with a single "failed to get run" prefix.Both tests fail on
main.go test ./cmd/air/...andgo test ./acceptance -run TestAccept/air/listpass.This pull request and its description were written by Isaac.