Repository navigation
Apply pause presets to job triggers - #7450
Conversation
045478c to
c42a8ec
Compare
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 2 tests: regression=2 unreleased=0 coverage=0 failing=0
TestAccept/bundle/presets/triggers_pause_status/DMS=: branch ✅ | main (8a17f53) ❌ | latest (v1.26.0) ❌main (8a17f53): latest (v1.26.0): TestAccept/bundle/presets/triggers_pause_status/DMS=true: branch ✅ | main (8a17f53) ❌ | latest (v1.26.0) ❌main (8a17f53): latest (v1.26.0): |
✅ Integration test reportCommit: 263d745
Top 6 slowest tests (at least 2 minutes):
|
| url: /Volumes/main/default/landing/ | ||
|
|
||
| presets: | ||
| trigger_pause_status: PAUSED |
There was a problem hiding this comment.
Could you also cover mode: development here (a dev target and validate -t dev)? That is the case the description is about and right now it is only unit-tested. Maybe this test also fits better next to acceptance/bundle/presets/preset_vs_dev_mode than under validate/.
There was a problem hiding this comment.
Good call, moved it to acceptance/bundle/presets/triggers_pause_status and added a dev target. Dev mode with an UNPAUSED preset is rejected by validation (see preset_vs_dev_mode), so the dev target only covers the PAUSED default.
| return c | ||
| } | ||
|
|
||
| func TestApplyPresetsTriggersPauseStatus(t *testing.T) { |
There was a problem hiding this comment.
Do we need this table test given the acceptance test? We try not to unit test mutators when the same can be shown in an acceptance output, and the extra cases here (UNPAUSED preset, no preset, table_update) could just be more jobs in that databricks.yml. Or is the table cheaper to read for this many combinations?
There was a problem hiding this comment.
Agreed, the acceptance output reads fine for these combinations. I added the UNPAUSED preset, no preset & table_update cases as extra targets and jobs, and dropped both the table test and the dev-mode unit test.
fec7efa to
6fe9376
Compare
Co-authored-by: Isaac <no-reply@databricks.com>
6fe9376 to
263d745
Compare
❌ Integration test reportCommit: 66d86c1
62 interesting tests: 50 FAIL, 9 RECOVERED, 3 KNOWN
Top 50 slowest tests (at least 2 minutes):
|
Changes
Apply
presets.trigger_pause_statusto eachtriggers[]entry on jobs, similar to howschedule,continuous&triggerare already handled. Only omitted values inherit the preset, so explicit per-trigger values are preserved. Development mode defaults the preset toPAUSED, so it is covered by the same change.Why
With
trigger_pause_status: PAUSEDormode: development, legacy schedules were paused buttriggers[]entries were left without a pause status. The backend then defaults them toUNPAUSED, so dev deployments of jobs using the new field could start running on their schedule.Tests
bundle/presets/triggers_pause_statuscovering no preset, PAUSED & UNPAUSED presets and development mode, across cron, file arrival & table update triggers with explicit, mixed & omitted values.