Skip to content

AIR CLI: drop max_retries from the ai_runtime_task payload#5813

Open
riddhibhagwat-db wants to merge 1 commit into
air-clifrom
air-max-retries-fix
Open

AIR CLI: drop max_retries from the ai_runtime_task payload#5813
riddhibhagwat-db wants to merge 1 commit into
air-clifrom
air-max-retries-fix

Conversation

@riddhibhagwat-db

Copy link
Copy Markdown

This pull request and its description were written by Isaac.

Changes

Stop sending max_retries / retry_on_timeout on the ai_runtime_task submit payload. Both fields are removed from the submitTask struct and from buildSubmitPayload. The max_retries YAML config field and its validation stay in the schema; it is simply no longer put on the wire for this submission path.

Why

On the ai_runtime_task path, execution retries are driven by the AI Runtime service (AICM), not by the Jobs task max_retries field — so setting it on the task had no effect on how many times a failing workload actually retried.

Observed directly: a run submitted with max_retries: 0 still made 4 attempts (3 retries). air get on that run confirmed the field round-tripped correctly (Max Retries 0) while the workload retried anyway. The Python CLI's native ai_runtime_task branch omits max_retries for the same reason; this matches that behavior.

Leaving the field on the payload was misleading: a user setting max_retries: 0 to disable retries would still see retries.

Tests

  • TestBuildSubmitPayload asserts the marshaled task contains neither max_retries nor retry_on_timeout.
  • Removed TestBuildSubmitPayload_NoRetries (it asserted the now-removed field was sent).
  • go test ./experimental/air/... and ./task lint-q pass.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

Could not determine reviewers from git history.
Round-robin suggestion: @apeforest

Eligible reviewers: @apeforest, @ben-hansen-db, @bfontain, @lu-wang-dl, @maggiewang-db, @panchalhp-db, @pardis-beikzadeh-db, @vinchenzo-db

Suggestions based on git history. See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: b25accb

Run: 28838095433

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 267 1026 9:13
💚​ aws windows 4 4 269 1024 5:50
💚​ aws-ucws linux 4 4 363 940 6:03
💚​ aws-ucws windows 4 4 365 938 7:25
💚​ azure linux 4 4 264 1026 7:41
💚​ azure windows 4 4 266 1024 5:51
💚​ azure-ucws linux 4 4 362 938 22:23
💚​ azure-ucws windows 4 4 364 936 13:52
💚​ gcp linux 4 4 260 1029 9:51
💚​ gcp windows 4 4 262 1027 7:05
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 28 slowest tests (at least 2 minutes):
duration env testname
13:51 azure-ucws linux TestSQLExecScalar
10:43 azure-ucws windows TestSQLExecScalar
8:18 gcp linux TestSecretsPutSecretStringValue
7:09 aws linux TestSecretsPutSecretStringValue
5:18 azure linux TestSecretsPutSecretStringValue
5:13 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
5:13 azure-ucws linux TestSecretsPutSecretStringValue
4:49 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:32 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:09 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:04 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:51 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:34 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:34 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:27 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:21 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:08 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:08 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:04 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:04 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:04 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:57 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:52 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:41 azure windows TestSecretsPutSecretStringValue
2:38 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:37 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:31 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:14 gcp windows TestSecretsPutSecretStringValue

@maggiewang-db maggiewang-db left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

execution retries are driven by the AI Runtime service (AICM) - Is it true?

@ben-hansen-db How is a user supposed to specify the max retry number with the new BYOT?

The ai_runtime_task path DOES honor the Jobs task max_retries field —
Jobs performs the retry and each attempt is created as a fresh AI Runtime
(AICM) workload (see ai-training AiTrainingHandlers: "Each Jobs retry
attempt is created as its own AICM workload"). So the retry knob is real;
the earlier assumption that it had no effect was wrong.

The actual mismatch with the Python CLI was that we always sent
max_retries (including an explicit 0) and derived retry_on_timeout from it.
Python's native (`is_ts`) path adds both fields only under
`if max_retries > 0`. Match that exactly:

- max_retries/retry_on_timeout are omitempty and set only when
  cfg.maxRetries() > 0.
- Unset max_retries still defaults to 3 (Python's default via
  sdk/config.py Field(default=3)), so plain `air run` sends 3.
- max_retries: 0 now omits both fields (server default / no retries),
  instead of sending "max_retries": 0.

Co-authored-by: Isaac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants