Skip to content

air: Report the MLflow retry in air get -o json - #7620

Draft
artemy-kolesnikov wants to merge 2 commits into
mainfrom
CNXT-2598-mlflow-retry-json
Draft

artemy-kolesnikov wants to merge 2 commits into
mainfrom
CNXT-2598-mlflow-retry-json

Conversation

@artemy-kolesnikov

@artemy-kolesnikov artemy-kolesnikov commented Nov 13, 2026 •

Copy link
Copy Markdown

Title: air: Report the MLflow retry in air get -o json

Changes

Since #7456, when a run's last retry failed before it started, the views link to an earlier retry's MLflow run. The text views say so ("(retry N)"), but air get -o json returned the earlier retry's MLflow IDs with no field saying which retry they came from. This change adds MLflowRetry to getData, set alongside mlflow_url from the existing mlflowIdentifiers.OlderRetry:

"mlflow_retry": 0

It is a *int with json:"mlflow_retry,omitempty", so it is absent when the MLflow IDs come from the run's latest retry. Responses where the link comes from an earlier retry intentionally gain mlflow_retry; all other responses, and every existing acceptance golden, are unchanged.

Why

The retry fallback in #7456 was reviewed for the text views only (the OlderRetry field and its "(retry N)" rendering), and the JSON view was missed. mlflowIDsFromRetries already computes the retry; this only surfaces it.

Tests

  • cmd/air/get_test.go: a new full-command JSON test (TestGetRunMLflowRetryJSON) runs air get -o json against a stub server where the last retry (attempt 2) never reached MLflow while attempt 0 did. It asserts the envelope contains mlflow_url pointing at attempt 0's MLflow run and mlflow_retry: 0. A control run whose only attempt logged to MLflow asserts the envelope has mlflow_url and no mlflow_retry key.
  • New acceptance fixture acceptance/air/get-mlflow-retry (modelled on logs-failed-retry): a failed run whose retries have no MLflow output at all, asserting air get -o json emits a clean envelope with neither mlflow_url nor mlflow_retry.
  • All existing air get goldens are unchanged (verified by running the whole acceptance/air suite). go test ./cmd/air/..., ./task fmt, ./task lint (0 issues) and ./task check-changelog pass.

This pull request and its description were written by Isaac.

The retry fallback lands in mlflowIDsFromRetries, which sets
OlderRetry when the MLflow identifiers come from an earlier retry
(a last retry that failed before it started never got an MLflow run
of its own). The text views show it as "(retry N)", but getData
never output it, so `air get -o json` returned an earlier retry's
MLflow IDs with no field saying which retry they came from.

Add MLflowRetry (*int, json:"mlflow_retry,omitempty") to getData,
set alongside mlflow_url. It is absent when the IDs come from the
latest retry, so existing JSON output (and the acceptance goldens)
is unchanged.

Covered by a full-command JSON unit test for both shapes (older
retry present with mlflow_retry: 0; latest attempt absent), and a
new acceptance fixture pinning the no-MLflow-output envelope.

Stacks on #7456.

Co-authored-by: Isaac <no-reply@databricks.com>
@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: 8777f4bfd | Workflow run

Regression test report

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

1 tests: regression=0 unreleased=0 coverage=1 failing=0
test branch main (c4559ed) latest (v1.26.0)
TestAccept/air/get-mlflow-retry ✅ ✅ ✅

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 8777f4b

Run: 43529958454

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 270 16 5:59
💚​ aws-windows-latest-4core-16gb 1 272 14 4:22
💚​ azure linux-2core-8gb 1 269 16 5:31
💚​ azure-windows-latest-4core-16gb 1 271 14 3:41
💚​ gcp linux-2core-8gb 1 270 16 4:51
💚​ gcp-windows-latest-4core-16gb 1 272 14 3:28
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
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:29 azure-windows-latest-4core-16gb TestAccept
3:15 aws-windows-latest-4core-16gb TestAccept
3:12 gcp-windows-latest-4core-16gb TestAccept

Co-authored-by: Isaac <no-reply@databricks.com>

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