Repository navigation
air: don't announce retries before a run fails - #7270
Merged
Merged
Conversation
`air run --watch` printed "Failed attempts will be retried up to 3 times." on every run, because max_retries defaults to 3. On a healthy run this reads as if something already failed. The log stream already prints "Retrying (n of m)..." when a retry actually happens. Tracking: CNXT-2481. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Integration test reportCommit: eebc79e
Top 6 slowest tests (at least 2 minutes):
|
caroline-db
approved these changes
Oct 30, 2026
Collaborator
Integration test reportCommit: eb72905
9 interesting tests: 9 flaky
Top 50 slowest tests (at least 2 minutes):
|
deco-sdk-tagging Bot
added a commit
that referenced
this pull request
Nov 4, 2026
## Release v1.24.0 ### Notable Changes * A variable used as the value of a secret is now sensitive: referencing it from any other field, such as a job parameter or a secret's `comment`, is an error because the value would be used in plain text. Mark other secret-holding variables with `sensitive: true` to get the same protection. ([#7288](#7288)) ### CLI * Fix `databricks auth login` and `databricks configure` overwriting the parent profile's host and token when saving a profile with a dotted name such as `team.prod` next to an existing `[team]`. ([#7266](#7266)) * `databricks auth login` and `databricks auth token` now reject the name of an existing profile after "Create a new profile" instead of logging in to that profile. ([#7196](#7196)) * `databricks auth login` and `databricks auth token` now reject a host that is not a URL with a hostname, such as `/`, `?o=123` or `https://`, instead of falling back to `DATABRICKS_HOST` or failing later. An empty host after "Enter a host URL manually" in the login profile picker no longer starts discovery login. ([#7195](#7195)) * Prompts that validate their input, such as the `databricks configure` host prompt, no longer open with a red cross before anything is typed. ([#7314](#7314)) * `databricks ssh connect` now documents `--environment-version` for choosing the serverless environment version, starts a separate default-named server for each version, and rejects the flag together with `--cluster`. Default connection names also include the environment version in their hash, so the default name when `--environment-version` is not specified changes with this release. Configuration associated with the old connection name (secret scope, SSH keys and known hosts in your local `.databricks` folder) will no longer be used and can be safely removed. ([#7310](#7310)) ### AI Runtime * Show workspace-supported accelerator types in `databricks air run -h config.compute.accelerator_type`. ([#7275](#7275)) * `air list` now reports `No active runs found.` for an empty active-only result. ([#7276](#7276)) * Stop printing a retry notice on every `air run --watch`; retries are still reported when they happen. ([#7270](#7270)) ### Bundles * Fix `bundle plan` reporting an update to an app's `config.env` values on every run, which also redeployed the app on every `bundle deploy`. The Apps API returns environment variable names only, so `value` and `value_from` are no longer compared against the remote deployment. ([#7326](#7326)) * Add the `data_quality_monitors` resource for data quality monitors on Unity Catalog schemas and tables (direct engine only). ([#7094](#7094)) * `bundle deploy` now asks for confirmation before recreating or deleting a Feature View, and `bundle deploy` and `bundle destroy` warn that FeatureSpecs using a Feature View are not checked. ([#7164](#7164)) * Accept grant `privileges` values that the SDK enum does not list yet: `bundle validate` no longer warns (or errors under `--strict`) on them, and the PyDABs `Privilege` enum accepts unknown strings instead of raising. The JSON schema and PyDABs still advertise the known values for completion. ([#7315](#7315)) * Add the `materialization_sets` resource, which materializes Feature Store Feature Views to offline and online stores. ([#7164](#7164)) * Detect notebooks with the same rule as the workspace: a `.py`, `.sql`, `.scala` or `.r` file is a notebook when its first line contains `Databricks notebook source`, for example after a byte order mark. Previously such a file was tracked as a plain file, so removing it locally left the remote notebook behind. ([#7290](#7290)) * Add `sensitive: true` for bundle variables. A variable used as the value of a secret is sensitive by default. `bundle validate -o json` redacts only sensitive variables instead of every string variable, and a sensitive variable can only be referenced from a sensitive resource field (such as a secret's `value`) or from another sensitive variable. ([#7288](#7288)) ### Dependency Updates * Bump dependencies with known vulnerabilities. ([#7305](#7305)) * Bump dependencies with known vulnerabilities. ([#7327](#7327)) * Update the Go SDK to [v0.191.1](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.191.1). ([#7277](#7277)) * Update the Go SDK to [v0.193.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.193.0). ([#7303](#7303))
idelafuente-oc
pushed a commit
to idelafuente-oc/cli
that referenced
this pull request
Nov 20, 2026
…atabricks#7623) Title: air: Stop showing Max Retries 0 when runs/get omits the retry limit ## Changes `air get` (and the `air list` info pane) showed `Max Retries 0` for AI Runtime runs whatever retry limit they were submitted with. Jobs `runs/get` leaves `max_retries` out of every task run, and SDK v0.197.0 decodes the missing field as 0. `maxRetries(run)` in `cmd/air/format.go` printed that 0. `resolveMaxRetries(run, configRaw)` now applies these rules in order: | Case | Shown | |---|---| | runs/get carries `max_retries` on the latest task (presence via the SDK's `ForceSendFields`, so an explicit 0 counts) | the server value (`unlimited` for -1) | | Not a `SUBMIT_RUN` (for example a bundle job deployed with `air convert-to-dabs`, whose limit lives in the job settings) | `N/A` | | Submit run whose uploaded config sets `max_retries` | that value, e.g. `1` | | Submit `ai_runtime_task` run whose config leaves it unset | `3 (CLI default)` | | Legacy `gen_ai_compute_task` run with no explicit value, multi-container run (no deployment `command_path`, so no config path), config missing or unreadable or unparsable | `N/A` | - The config is the one `air get` already downloads for the Configuration box. `resolveConfigYAML` / `configYAML` now also return the raw bytes, so there is no extra request. Only the `max_retries` key is decoded, leniently, so configs from other CLI versions still parse. - `air list`'s info pane now runs the same `ai_runtime_task` enrichment as `air get` (same guard), so it shows the config box, accelerators and the same Max Retries value instead of N/A. - `resolveMaxRetries` returns the limit and its source (`reported` / `configured` / `cli_default`) so `air get -o json` can expose the same value later. JSON output is unchanged in this PR. - Changelog fragment: `.nextchanges/air/get-max-retries.md`. ## Why A supervising agent couldn't tell whether a failed workload would be retried: help says the default is 3, the run used 3, and `air get` said 0. The submit-message half of the report ("Failed attempts will be retried up to 3 times.") was already removed by databricks#7270. Why the default is assumed only for `ai_runtime_task` submit runs: - The Go CLI only emits `ai_runtime_task`, and `runsubmit.go` always sends `max_retries` (`ForceSendFields`), defaulting to `defaultMaxRetries = 3`. The Python CLI defaulted to 3 before it first emitted `ai_runtime_task`. - Legacy `gen_ai_compute_task` runs may predate the Python CLI's switch from 0 to 3 (2026-05-22), and nothing on the run records which version submitted it, so an unset value is unknown. - Job runs take their retries from the job's task settings. A user can edit `max_retries` in `databricks.yml` after `convert-to-dabs`, so the synced `training_config.yaml` can be stale. Rejected: - **Wide scope:** read `jobs/get` settings for job runs and search bundle deployment directories for configs. More code and risk for a less common path. Job runs show `N/A` here; see follow-ups. - **Always show 3 when unset:** gives a false 3 for older legacy runs and for job runs whose settings differ. - **Server value only (N/A when missing):** ignores the config the CLI already downloads, and the ticket asks for the budget to be shown. - **Use the SDK's 0 as-is:** the bug. ## Tests - `TestMaxRetries` (15 cases): config 1 / 0 / -1, unset → `3 (CLI default)`, no config, unparsable config, legacy unset → N/A, legacy explicit 2, job run with and without a config → N/A, unknown run type → N/A, server 0 over a config of 2, server 5 on a job run, server -1, no tasks. - `TestResolveMaxRetriesSource`: the source each case reports. - `TestMaxRetriesFromDecodedRunGet`: decodes real `runs/get` response bodies captured from a workspace through the SDK. Absent key + config 1 → `1`; absent key + unset → `3 (CLI default)`; multi-container body → no config path, `N/A`; Python-shaped legacy body → `N/A`; explicit `"max_retries": 0` → `0`. - `TestRunDetailTextReadsTheUploadedConfig` (list pane, httptest): configured `1`, unset `3 (CLI default)`, config download 404 → `N/A`, job run → `N/A`. - With `resolveMaxRetries` swapped back to the old behaviour (read the SDK field, 0 when absent), 11 of 15 `TestMaxRetries` cases, `TestMaxRetriesFromDecodedRunGet` and all 4 list-pane cases fail. The 4 that still pass are the 3 server-reported cases and config `0`, where the old 0 is right by coincidence. - Acceptance: `air/get` and `air/get-ai-runtime` no longer seed `"max_retries": 3` on the fake task (the real API never returns it) and now set `"run_type": "SUBMIT_RUN"`. `get-ai-runtime` adds a second case that re-imports a config with `max_retries: 1`. Goldens: `get` → `N/A` (legacy, unset), `get-ai-runtime` → `3 (CLI default)` then `1`. With the old code these fixtures fail (`0` in all three places). - `go test ./cmd/air/... -count=1` passes. `go test ./acceptance -run 'TestAccept/air/'` passes (20 fixtures). `./task lint-q-go-root` (0 issues), `./task fmt-q-go`, `./task deadcode` (no dead code), `./task check-changelog` and gofmt are clean. ## Manual verification (against a workspace) `NO_COLOR=1 databricks air get <run>`, base build vs this change: | Run | Config | Base | Fixed | |---|---|---|---| | a failed run, retried once (attempts 0 and 1) | `max_retries: 1` | `Max Retries 0` | `Max Retries 1` | | a failed run, attempt 0 only | `max_retries: 0` | `Max Retries 0` | `Max Retries 0` | | a run submitted for this test, then cancelled | unset | `Max Retries 0` | `Max Retries 3 (CLI default)` | | another user's run, config not readable | unknown | `Max Retries 0` | `Max Retries N/A` | - Raw `runs/get` for the submitted run has `run_type: SUBMIT_RUN`, and its task keys contain no `max_retries`. - `air get -o json` returns the same keys with both builds. ## Follow-ups (not in this PR) - `air get -o json` should expose `max_retries`. Call `resolveMaxRetries` and report the source as data (`reported` / `configured` / `cli_default` / null) rather than as a suffix. JSON mode would also need to download the config, which it doesn't today. - Job runs: read `jobs/get(job_id)` `settings.tasks[task_key].max_retries`, labelled as the current job settings. - Multi-container runs: derive the config path from `containers[].command_path`. The SDK's `DeploymentSpec` doesn't decode `containers` yet, so this needs a raw read or an SDK bump. - Jobs: `runs/get` doesn't echo `max_retries` / `retry_on_timeout` / `min_retry_interval_millis` on task runs, although the API model documents `max_retries` there. This pull request and its description were written by Isaac. --------- Co-authored-by: Isaac <no-reply@databricks.com>
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.
Changes
Remove the "Failed attempts will be retried up to N times." line that
databricks air run --watchprints between "Monitoring run and streaming logs..." and the logs divider. A retry is still reported when it actually happens (Retrying (1 of 3)...), so no information is lost.Why
max_retriesdefaults to 3, so every watched run printed this line before any logs streamed. On a healthy run it reads as if an attempt had already failed, which users reported as a papercut.Tests
TestRunWatchStreamsLogsnow asserts that a successful watched run never mentions retries. The existinglogstream_test.gocoverage ofRetrying (1 of 3)...on a real retry is unchanged.cmd/airunit tests and theTestAccept/air/acceptance tests pass locally; golangci-lint oncmd/airreports no issues.This pull request and its description were written by Isaac.