Skip to content

Carry a schedule onto the bundle job - #6240

Open
vinchenzo-db wants to merge 3 commits into
mainfrom
vchen/air-schedule
Open

Carry a schedule onto the bundle job#6240
vinchenzo-db wants to merge 3 commits into
mainfrom
vchen/air-schedule

Conversation

@vinchenzo-db

@vinchenzo-db vinchenzo-db commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

air run on a config with a schedule block creates a persistent, scheduled Databricks job (via jobs/create) instead of submitting a one-time run.
It reuses the existing upload path — the code snapshot + launch scripts already go to a durable workspace path and build the ai_runtime_task — and swaps jobs/runs/submit for a jobs/create carrying a CronSchedule. The CLI keeps no state, so the job is upserted by name: an existing job with the same experiment_name is updated in place (re-running doesn't pile up duplicates); an ambiguous name (>1 match) errors rather than guessing.
Schedule YAML mirrors the Jobs cron block (quartz_cron_expression, timezone_id, optional pause_status). convert-to-dabs also carries the schedule, so converting a scheduled config to a bundle keeps it.

Co-authored-by: Isaac

Changes

Why

Tests

# v.chen at ip-10-90-27-152 in /tmp/sched-e2e (git:) [23:40:51]
$ cd /home/v.chen/.worktrees/cli/air-schedule && go build -o /tmp/dbcli-sched . && echo built
export PROFILE=df1
rm -rf /tmp/sched-e2e && mkdir -p /tmp/sched-e2e/src && printf 'print("hello from scheduled run")\n' > /tmp/sched-e2e/src/train.py
cat > /tmp/sched-e2e/train.yaml <<'EOF'
experiment_name: sched-e2e-smoke
command: cd "$CODE_SOURCE_PATH" && python train.py
compute:
  accelerator_type: GPU_1xA10
  num_accelerators: 1
code_source:
  type: snapshot
  snapshot:
    root_path: ./src
schedule:
  quartz_cron_expression: "0 0 9 * * ?"
  timezone_id: America/Los_Angeles
  pause_status: PAUSED
EOF
built
# v.chen at ip-10-90-27-152 in ~/.worktrees/cli/air-schedule (git:vchen/air-schedule) [23:40:56]
$ cd /tmp/sched-e2e && DATABRICKS_CONFIG_PROFILE=$PROFILE /tmp/dbcli-sched experimental air run -f train.yaml --dry-run
Dry run: configuration for "sched-e2e-smoke" is valid; not submitting.
# v.chen at ip-10-90-27-152 in /tmp/sched-e2e (git:) [23:41:04]
$ cd /tmp/sched-e2e && DATABRICKS_CONFIG_PROFILE=$PROFILE /tmp/dbcli-sched experimental air run -f train.yaml
Uploading src_20260811_234123.tar.gz...
Created scheduled job 878089318162837
View at: https://dbc-559ffd80-2bfc.cloud.databricks.com/jobs/878089318162837
Runs on schedule: 0 0 9 * * ? (America/Los_Angeles)
The schedule is PAUSED; set pause_status: UNPAUSED (or unpause it in the Jobs UI) to activate it.
# v.chen at ip-10-90-27-152 in /tmp/sched-e2e (git:) [23:41:24]
$ 
image

A run YAML may now set a `schedule` block (quartz_cron_expression, timezone_id,
and optional pause_status). `air run` submits a one-time run and can't honor it,
so it detects the schedule and offers to convert the config to a bundle instead —
where `bundle deploy` creates the persistent, scheduled job. convert-to-dabs maps
the block 1:1 onto the bundle job's schedule.

Co-authored-by: Isaac
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/experimental/air/ - needs approval

4 files changed
Suggested: @riddhibhagwat-db
Also eligible: @apeforest, @bfontain, @lu-wang-dl, @panchalhp-db, @maggiewang-db, @ben-hansen-db, @pardis-beikzadeh-db

/experimental/air/ - needs approval

8 files changed
Suggested: @riddhibhagwat-db
Also eligible: @apeforest, @bfontain, @lu-wang-dl, @panchalhp-db, @maggiewang-db, @ben-hansen-db, @pardis-beikzadeh-db

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db, @rugpanov, @rclarey) can approve all areas.
See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 5aa03c8

Run: 31547169736

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 286 1134 5:41
💚​ aws windows 4 4 288 1132 6:26
💚​ azure linux 4 4 285 1134 5:35
💚​ azure windows 4 4 287 1132 8:23
💚​ gcp linux 1 5 286 1134 6:12
💚​ gcp windows 1 5 288 1132 6:41
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
8:13 azure windows TestAccept
6:31 gcp windows TestAccept
6:18 aws windows TestAccept
3:01 aws linux TestAccept
2:57 azure linux TestAccept
2:54 gcp linux TestAccept

Pivot the schedule handling: instead of offering to convert to a bundle, a
run config with a `schedule` block now makes `air run` create (or update) a
persistent, scheduled Databricks job directly via jobs/create.

`air run` already uploads the code snapshot + launch scripts to a durable
workspace path and builds the ai_runtime_task; this reuses that prep and swaps
the ephemeral jobs/runs/submit for a jobs/create carrying a CronSchedule. Since
the CLI keeps no state, the job is upserted by name: an existing job with the
same experiment_name is reset in place (so re-running doesn't pile up
duplicates), and an ambiguous name (>1 match) errors rather than guessing.

convert-to-dabs still emits the schedule block, so converting a scheduled
config to a bundle keeps the schedule.

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.

2 participants