Repository navigation
air: reject non-AIR run IDs in air cancel - #7569
Merged
Merged
Conversation
`air cancel JOB_RUN_ID` sent the ID straight to the Jobs cancel API, so a mistyped but valid run ID could cancel an unrelated Jobs run. Explicit IDs are now resolved via runs/get and rejected unless they are AI Runtime runs. --all already lists only AIR runs, so it skips the extra lookup. Fixes CNXT-2581. Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=0 unreleased=0 coverage=1 failing=0
|
| return fmt.Errorf("invalid run ID %q: must be a positive integer", rid) | ||
| } | ||
| if !skipAirCheck { | ||
| run, err := fetchJobRun(ctx, w, runID) |
Contributor
There was a problem hiding this comment.
nit: With this change, the JSON failed[].error text for a run that doesn't exist (or that you can't view) changes. It used to be the cancel API's error. Now it's the error from fetchJobRun, which starts with failed to get run <id>: .... Text output is unaffected because runNotFound still matches the wrapped error. Could you mention this in .nextchanges/air/air-cancel-verify.md in case anyone scripts against the JSON error text?
maggiewang-db
approved these changes
Nov 12, 2026
caroline-db
approved these changes
Nov 12, 2026
caroline-db
left a comment
Contributor
There was a problem hiding this comment.
changelog is missing pr # (CI failure), otherwise lgtm
Collaborator
✅ Integration test reportCommit: cccbc84
Top 14 slowest tests (at least 2 minutes):
|
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
Author
|
/trigger all |
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
❌ Integration test reportCommit: 6bc799c
963 interesting tests: 830 MISS, 123 FAIL, 6 RECOVERED, 4 KNOWN
Top 50 slowest tests (at least 2 minutes):
|
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.
air cancel JOB_RUN_IDsent the ID straight to the Jobs cancel API, so a mistyped but valid run ID could cancel an unrelated Jobs run. Explicit IDs are now resolved via runs/get and rejected unless they are AI Runtime runs. --all already lists only AIR runs, so it skips the extra lookup.