Skip to content

air: Report pending compute status in air get JSON - #7453

Closed
pardis-beikzadeh-db wants to merge 2 commits into
databricks:mainfrom
pardis-beikzadeh-db:air/get-json-pending-status
Closed

pardis-beikzadeh-db wants to merge 2 commits into
databricks:mainfrom
pardis-beikzadeh-db:air/get-json-pending-status

Conversation

@pardis-beikzadeh-db

@pardis-beikzadeh-db pardis-beikzadeh-db commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • air get -o json now reports PENDING while the run's task is still waiting for compute, matching air list -o json (#6717).
  • Add status_message to air get -o json: the run's current progress message, as the text view shows it in Status. Only set while the run is unfinished.

Why

The Jobs API reports the parent run as RUNNING before its task gets compute, so agents polling air get -o json treated a queued run as started. Internal ticket: CNXT-2498.

Tests

  • New acceptance test acceptance/air/get-pending; acceptance/air/get-ai-runtime now also checks that a finished run has no status_message.
  • go test ./cmd/air, go test ./acceptance -run TestAccept/air/, ./task checks, ./task lint.

This pull request and its description were written by Isaac.

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 AIR Databricks AI Runtime CLI label Nov 10, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
@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: 7453
  • Commit SHA: 41fc017ec18e717a842beb611dd4046a5ffd6ce2

Checks will be approved automatically on success.

@pardis-beikzadeh-db

Copy link
Copy Markdown
Contributor Author

Superseded by #7455

tedjt pushed a commit to tedjt/cli that referenced this pull request Nov 12, 2026
## Changes

- `air get -o json` now reports `PENDING` while the run's task is still
waiting for compute, matching `air list -o json`
([databricks#6717](databricks#6717)).
- Add `status_message` to `air get -o json`: the run's current progress
message, as the text view shows it in Status. Only set while the run is
unfinished.

## Why

The Jobs API reports the parent run as `RUNNING` before its task gets
compute, so agents polling `air get -o json` treated a queued run as
started. Internal ticket: CNXT-2498.

## Tests

- New acceptance test `acceptance/air/get-pending`;
`acceptance/air/get-ai-runtime` now also checks that a finished run has
no `status_message`.
- `go test ./cmd/air`, `go test ./acceptance -run TestAccept/air/`,
`./task checks`, `./task lint`.

## Manual test

`air get <run_id> -o json` on a 1xA10 run while its task waited for
compute (status fields only):

```
w/o fix
"status": "RUNNING",

w/ fix
"status": "PENDING",
"status_message": "Waiting for accelerator compute capacity to become available...",
```

After cancel, both builds return `"status": "CANCELED"` with no
`status_message`.

Supersedes databricks#7453 (opened from a
fork, so its CI could not run).

_This pull request and its description were written by Isaac._

---------

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIR Databricks AI Runtime CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant