AIR CLI Integration: show environment for AI Runtime runs in air get - #6244
Merged
Conversation
air getair get
Collaborator
Integration test reportCommit: 4c43416
8 interesting tests: 4 RECOVERED, 4 SKIP
Top 1 slowest tests (at least 2 minutes):
|
riddhibhagwat-db
force-pushed
the
air-get-environment-from-config
branch
from
August 12, 2026 02:25
8d0a6af to
71a6aed
Compare
vinchenzo-db
approved these changes
Aug 12, 2026
riddhibhagwat-db
force-pushed
the
air-get-environment-from-config
branch
from
August 12, 2026 21:00
71a6aed to
acbcdef
Compare
`air get`'s Environment cell always showed "N/A" for AI Runtime (serverless) runs. Their environment version lives on the run's environments[].spec (keyed by the task's environment_key), but the typed SDK Run struct has no environments field, so w.Jobs.GetRun drops it. Resolve the Environment cell from that field via a raw GetRun request, keyed by aiRuntimeEnvironmentKey. The gen_ai_compute runtime-image source is dropped rather than special-cased: that path is deprecated, so gen_ai runs now show "N/A" for the environment. Co-authored-by: Isaac
riddhibhagwat-db
force-pushed
the
air-get-environment-from-config
branch
from
August 12, 2026 21:15
acbcdef to
4c43416
Compare
riddhibhagwat-db
added a commit
that referenced
this pull request
Aug 13, 2026
## Summary **#6153 ("AIR CLI Migration: `--download-to` flag for logs") was lost from `air-cli`.** It merged on 2026-08-06, but `air-cli` was later rewound to `1fcb3c09a` before #6239 merged (08-12), and the rebuilt line (#6239 → #6244 → #6241) bypassed #6153. As a result `air-cli` today still carries the **pre-#6153 stub**: - `logs.go`: `--download-to is not implemented yet` (the flag is rejected) - no `logdownload.go` / `logdownload_test.go` - no `acceptance/experimental/air/logs-download/` test dir This PR restores #6153's change set onto the current `air-cli` tip. ## How Cherry-pick of #6153's original squash commit (`60cd876910cd`) onto `air-cli`. Verified equivalence to the original: - Every file except `logstream.go` is **byte-identical** to what #6153 landed. - `logstream.go` is re-merged against #6241's later edits to that file (git auto-merged it cleanly; both changes coexist). ## Testing - `go build ./experimental/air/...` — ok - `go test ./experimental/air/...` — 548 pass - `go test ./acceptance -run TestAccept/experimental/air` — 29 pass (incl. `logs` and the restored `logs-download`) - Package lints clean - Confirmed the `--download-to is not implemented` stub is gone and `logs.go` now wires the real implementation This pull request and its description were written by Isaac.
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.
Summary
air get's Environment cell always showedN/Afor AI Runtime (serverless) runs — the kindair runsubmits.The environment version those runs use lives on the run's
environments[].spec.environment_version(keyed by the task'senvironment_key), but the typed SDKjobs.Runstruct has noenvironmentsfield, sow.Jobs.GetRunsilently drops it and the cell fell back toN/A.The cell is now resolved from that field via a raw
GetRunrequest, matching the entry keyed"default"(aiRuntimeEnvironmentKey).The previous
gen_ai_computeruntime-image source (DlRuntimeImage) is dropped rather than special-cased — that path is deprecated, sogen_ai_computeruns now showN/Afor the environment.Changes
experimental/air/cmd/render.go: newaiRuntimeEnvironmentVersionhelper — a raw GET to/api/2.2/jobs/runs/getthat decodes only theenvironments[]array the typed SDK drops (same raw-call pattern asusagepolicy.go/aitraining.go). Best-effort: logs and returns""on any error or when the run declares no environment.renderRunTextsets the cell from it (empty → staysN/A).experimental/air/cmd/get.go:buildGetDatano longer seeds the cell from the gen_aiDlRuntimeImage; environment is resolved at render time (it needs an extra API call).experimental/air/cmd/format.go: removed the now-unusedenvironment(run)helper.Testing
experimental/air/get-ai-runtimeacceptance test: mockruns/getnow returns anenvironmentsblock; golden assertsEnvironment 4.experimental/air/get(gen_ai) acceptance test: golden updated toEnvironment N/A(deprecated path).render_test.goupdated;go test ./experimental/air/...andgo test ./acceptance -run TestAccept/experimental/airpass; package lints clean.air get 796253027111946showsEnvironment 4.Manual verification:
