[air] Add air list/get provisioned_capacity commands - #6595
Open
vinchenzo-db wants to merge 1 commit into
Open
Conversation
Adds two read commands for pre-provisioned AI Runtime capacity reservations
(the same reservation a run targets via compute.provisioned_capacity_id):
- `air list provisioned_capacity` — the workspace's reservations
(id, accelerator type, reserved accelerators).
- `air get provisioned_capacity <id>` — one reservation plus its accelerator
usage summary (used / idle).
Both call AiWorkflowService's purpose-built public read API
(GET /api/2.0/ai-training/provisioned-capacities[/{id}]) via a raw client.Do,
matching the sibling `air list` workflows call. The platform tracks these
internally as "guaranteed capacity"; the public surface (and this CLI) calls
them "provisioned capacity". Usage is populated only by Get, so the list view
omits it. Output uses the same JSON envelope + text pattern as the other air
commands, and the SAFE-gate the server returns before rollout is surfaced as a
clear FEATURE_DISABLED error rather than a retryable one.
Tests: unit tests for the projections, resource-name handling, int64-as-string
decoding, pagination, and the JSON/text/not-found/feature-disabled paths; an
acceptance test drives the real binary against a mocked endpoint (text + JSON
goldens). Verified live against e2-dogfood: the CLI reaches the deployed
handler and classifies its responses correctly (the API is SAFE-gated off there,
so the successful list/get shape is covered by the goldens).
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
Approval status: pending
|
Collaborator
Integration test reportCommit: 07094fc
Top 13 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.
Adds two read commands for pre-provisioned AI Runtime capacity reservations (the same reservation a run targets via compute.provisioned_capacity_id):
air list provisioned_capacity— the workspace's reservations (id, accelerator type, reserved accelerators).air get provisioned_capacity <id>— one reservation plus its accelerator usage summary (used / idle).Both call AiWorkflowService's purpose-built public read API (GET /api/2.0/ai-training/provisioned-capacities[/{id}]) via a raw client.Do, matching the sibling
air listworkflows call. The platform tracks these internally as "guaranteed capacity"; the public surface (and this CLI) calls them "provisioned capacity". Usage is populated only by Get, so the list view omits it. Output uses the same JSON envelope + text pattern as the other air commands, and the SAFE-gate the server returns before rollout is surfaced as a clear FEATURE_DISABLED error rather than a retryable one.Tests: unit tests for the projections, resource-name handling, int64-as-string decoding, pagination, and the JSON/text/not-found/feature-disabled paths; an acceptance test drives the real binary against a mocked endpoint (text + JSON goldens). Verified live against e2-dogfood: the CLI reaches the deployed handler and classifies its responses correctly (the API is SAFE-gated off there, so the successful list/get shape is covered by the goldens).
Changes
Why
Tests