Skip to content

air: render list filter errors as JSON - #7612

Open
caroline-db wants to merge 1 commit into
mainfrom
air/list-json-filter-errors
Open

caroline-db wants to merge 1 commit into
mainfrom
air/list-json-filter-errors

Conversation

@caroline-db

Copy link
Copy Markdown
Contributor

What did you change, and why?

  • Render air list filter validation failures with the standard AIR error envelope in JSON mode.
  • Classify invalid input as permanent and compute-options lookup failures as transient while preserving text output.

How do you know it works?

  • Added unit coverage for invalid filters, accelerator validation, and transient lookup failures.
  • Added acceptance coverage for JSON and unchanged text rendering.
  • Ran full formatting, checks, lint, and unit tests plus the targeted AIR list acceptance test. The full acceptance suite was not completed locally because unrelated offline Python template tests lacked cached packages.

This PR was written by Codex.

@caroline-db
caroline-db requested review from a team as code owners November 13, 2026 17:39
@caroline-db
caroline-db requested a review from rclarey November 13, 2026 17:39
@github-actions github-actions Bot added the AIR Databricks AI Runtime CLI label Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 8475d0c9d | Workflow run

Regression test report

Selected 1 changed tests (limit=20, 0 not selected)

1 tests: regression=1 unreleased=0 coverage=0 failing=0
test branch main (d5978e9) latest (v1.26.0)
TestAccept/air/list ✅ ❌ ❌
TestAccept/air/list: branch ✅ | main (d5978e9) ❌ | latest (v1.26.0) ❌

main (d5978e9):

acceptance_test.go:1374: Diff:
        --- air/list/output.txt
        +++ /tmp/TestAcceptairlist278104721/002/output.txt
        @@ -69,13 +69,4 @@
         === invalid filter (json)
         
         >>> musterr [CLI] air list --filter bogus=1 -o json
        -{
        -  "v": 1,
        -  "ts": "[TIMESTAMP]",
        -  "error": {
        -    "code": "INVALID_ARGS",
        -    "kind": "PERMANENT",
        -    "message": "unsupported --filter key \"bogus\": supported keys are accelerator_type, experiment, num_accelerators, user",
        -    "retryable": false
        -  }
        -}
        +Error: unsupported --filter key "bogus": supported keys are accelerator_type, experiment, num_accelerators, user
        
FAIL

latest (v1.26.0):

acceptance_test.go:1374: Diff:
        --- air/list/output.txt
        +++ /tmp/TestAcceptairlist1793426809/002/output.txt
        @@ -19,12 +19,7 @@
                 "user": "[USERNAME]",
                 "status": "SUCCESS",
                 "started_at": "[TIMESTAMP]",
        -        "is_sweep": false,
        -        "experiment_name": "qwen-train",
        -        "duration_seconds": 12,
        -        "accelerator_type": "GPU_8xH100",
        -        "num_accelerators": 8,
        -        "dashboard_url": "[DATABRICKS_URL]/jobs/runs/334747067049496?o=[WORKSPACE_ID]"
        +        "is_sweep": false
               }
             ]
           }
        @@ -50,12 +45,7 @@
                 "user": "[USERNAME]",
                 "status": "SUCCESS",
                 "started_at": "[TIMESTAMP]",
        -        "is_sweep": false,
        -        "experiment_name": "qwen-train",
        -        "duration_seconds": 12,
        -        "accelerator_type": "GPU_8xH100",
        -        "num_accelerators": 8,
        -        "dashboard_url": "[DATABRICKS_URL]/jobs/runs/334747067049496?o=[WORKSPACE_ID]"
        +        "is_sweep": false
               }
             ]
           }
        @@ -69,13 +59,4 @@
         === invalid filter (json)
         
         >>> musterr [CLI] air list --filter bogus=1 -o json
        -{
        -  "v": 1,
        -  "ts": "[TIMESTAMP]",
        -  "error": {
        -    "code": "INVALID_ARGS",
        -    "kind": "PERMANENT",
        -    "message": "unsupported --filter key \"bogus\": supported keys are accelerator_type, experiment, num_accelerators, user",
        -    "retryable": false
        -  }
        -}
        +Error: unsupported --filter key "bogus": supported keys are accelerator_type, experiment, num_accelerators, user
        
FAIL

@caroline-db
caroline-db force-pushed the air/list-json-filter-errors branch from 98c853c to 8475d0c Compare November 13, 2026 18:01
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 8475d0c

Run: 43478592863

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
🔄​ aws linux-2core-8gb 3 1 267 16 9:17
💚​ aws-windows-latest-4core-16gb 1 272 14 7:01
💚​ azure linux-2core-8gb 1 269 16 5:21
💚​ azure-windows-latest-4core-16gb 1 271 14 5:10
💚​ gcp linux-2core-8gb 1 270 16 6:17
💚​ gcp-windows-latest-4core-16gb 1 272 14 5:27
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🔄​ TestExportDirDoesNotOverwrite 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestFilerRecursiveDelete 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestFilerRecursiveDelete/workspace_files 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
Top 4 slowest tests (at least 2 minutes):
duration env testname
3:31 azure-windows-latest-4core-16gb TestAccept
3:11 aws-windows-latest-4core-16gb TestAccept
3:08 gcp-windows-latest-4core-16gb TestAccept
2:37 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir

This branch has not been deployed

No deployments
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.

2 participants