Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
3099afb
job_runs: add lifecycle.triggers.on_file_change
radakam Aug 18, 2026
a61e662
job_runs: fix exhaustruct and regenerate refschema for on_file_change
radakam Aug 18, 2026
568540f
job_runs: tighten on_file_change path and directory checks
radakam Aug 18, 2026
fa6de6f
job_runs: store on_file_change as path-to-hash only
radakam Aug 18, 2026
ce24a87
job_runs: use maps.Copy in on_file_change hash merge
radakam Aug 18, 2026
eb34c41
job_runs: drop filepath.Glob jargon from on_file_change schema docs
radakam Aug 19, 2026
3595e3a
acc: refresh on_file_change goldens for resource-key progress lines
radakam Aug 19, 2026
58392c9
acc: cover on_file_change globs, errors, and appear/disappear
radakam Aug 19, 2026
ca1f5d4
acc: expand on_file_change glob coverage and skip ignored files
radakam Aug 19, 2026
426a9f3
acc: force-add gitignored on_file_change fixture
radakam Aug 19, 2026
1b3f797
acc: drop READPLAN from the on_file_change glob test
radakam Aug 20, 2026
13bf6f6
acc: restore READPLAN on the on_file_change glob test
radakam Aug 20, 2026
41fc58b
job_runs: address on_file_change review comments
radakam Aug 20, 2026
756b446
job_runs: list every trigger field to satisfy exhaustruct
radakam Aug 20, 2026
c2d364d
job_runs: keep empty nested lifecycle on state and remote
radakam Aug 21, 2026
c2e04c9
job_runs: keep the lifecycle fingerprint out of the remote type
radakam Aug 21, 2026
575f266
job_runs: store on_file_change hashes on the trigger itself
radakam Aug 24, 2026
2892947
acc: refresh job_runs goldens for the omitted empty trigger
radakam Aug 24, 2026
19b4448
job_runs: error when on_file_change hashes nothing
radakam Aug 24, 2026
ae51339
acc: fix on_file_change_errors diagnostic line numbers
radakam Aug 24, 2026
ad85edf
acc: removing on_file_change is unchanged, not an update
radakam Aug 24, 2026
7b715fc
job_runs: resolve on_file_change relative to the defining YAML file
radakam Aug 24, 2026
8e61fa1
job_runs: reject absolute on_file_change patterns
radakam Aug 25, 2026
0934d61
job_runs: warn instead of erroring when on_file_change hashes nothing
radakam Aug 25, 2026
8670de6
acc: stop Git Bash rewriting the on_file_change absolute pattern
radakam Aug 25, 2026
94fb2e5
acc: read the absolute on_file_change pattern from a committed file
radakam Aug 25, 2026
f24efe8
job_runs: match on_file_change patterns against synced files and drop…
radakam Aug 27, 2026
380cda9
job_runs: persist trigger fingerprints as lifecycle.triggers_state
radakam Aug 27, 2026
aa26223
job_runs: store triggers_state as a pointer on state
radakam Aug 27, 2026
427b320
acc: keep LF when rewriting on_file_change include fixtures
radakam Aug 27, 2026
3dcb9d4
job_runs: key on_file_change fingerprints by pattern
radakam Aug 27, 2026
123ffa4
job_runs: aggregate file trigger fingerprints by pattern
radakam Aug 27, 2026
abe08c1
job_runs: fingerprint on_file_change after build and persist cleared …
radakam Aug 27, 2026
85f00b7
job_runs: drop redundant on_file_change validation and unit tests
radakam Aug 28, 2026
d097bf9
nextchanges: conform on_file_change fragment to the bullet+PR-link fo…
denik Sep 3, 2026
318fb12
acc: record the inherited DMS matrix in the new on_file_change goldens
denik Sep 3, 2026
5fda712
job_runs: fingerprint on_file_change once, after the predeploy script
denik Sep 3, 2026
a66e358
job_runs: drop the duplicate on_file_change pre-scan
denik Sep 3, 2026
2eb2468
job_runs: drop removed-trigger changes instead of persisting cleared …
denik Sep 3, 2026
4f39ed8
job_runs: revert unrelated churn in type_test.go and expand the overr…
denik Sep 4, 2026
4d2480b
update test
denik Sep 4, 2026
0dbf58c
acc: inline plan_no_changes in the on_file_change script
denik Sep 4, 2026
04e72c8
Revert "acc: inline plan_no_changes in the on_file_change script"
denik Sep 4, 2026
1fdcae8
acc: commit the on_file_change create-plan golden
denik Sep 4, 2026
df0746e
job_runs: inline fileTriggerDiag
denik Sep 4, 2026
dcd6024
job_runs: reject Windows-rooted on_file_change patterns on every host
denik Sep 4, 2026
6961c6a
job_runs: give JobRunTriggersState an IsEmpty method
denik Sep 4, 2026
73d4865
job_runs: note why on_file_change hashes the candidate sync set
denik Sep 7, 2026
ea1c789
job_runs: match OverrideChangeDesc paths by string like other resources
denik Sep 8, 2026
6c87810
job_runs: move JobRunLifecycle types to job_run.go
denik Sep 8, 2026
f894190
job_runs: regenerate pydabs and refschema for on_file_change
denik Sep 8, 2026
59f5817
acc: mask plan_version in the on_file_change create-plan golden
denik Sep 8, 2026
b39cfed
shorten desc
denik Sep 9, 2026
c27a0b7
job_runs: regenerate for main rebase (DMS version_id, refschema)
denik Sep 9, 2026
a55df32
job_runs: drop stale AI-snapshot mention from the include comment
denik Sep 9, 2026
964ccdd
job_runs: drop the prevent_destroy trigger validation, rely on the ge…
denik Sep 9, 2026
d2c544e
job_runs: drop stale generated-overlays mention from the fingerprint …
denik Sep 9, 2026
a32d777
job_runs: drop vfs.Overlay from the file-trigger hash test
denik Sep 9, 2026
6391342
job_runs: regenerate pydabs docstrings after dropping the prevent_des…
denik Sep 10, 2026
f964f6f
job_runs: reject only genuinely absolute on_file_change patterns
denik Sep 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nextchanges/bundles/job-runs-on-file-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* direct: resources.job\_runs: new lifecycle.triggers.on\_file\_change setting to restart the run when monitored files change. Can be set to a series of paths or globs. ([#6309](https://github.com/databricks/cli/pull/6309))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* direct: resources.job\_runs: new lifecycle.triggers.on\_file\_change setting to restart the run when monitored files change. Can be set to a series of paths or globs. ([#6309](https://github.com/databricks/cli/pull/6309))
* direct: `resources.job_runs`: new `lifecycle.triggers.on_file_change` setting to restart the run when monitored files change. Can be set to a series of paths or globs. ([#6309](https://github.com/databricks/cli/pull/6309))

7 changes: 5 additions & 2 deletions acceptance/bundle/refschema/out.fields.txt
Original file line number Diff line number Diff line change
Expand Up @@ -925,11 +925,14 @@ resources.job_runs.*.lifecycle *dresources.JobRunLifecycleState STATE
resources.job_runs.*.lifecycle *resources.JobRunLifecycle INPUT
resources.job_runs.*.lifecycle resources.Lifecycle INPUT
resources.job_runs.*.lifecycle.prevent_destroy bool INPUT
resources.job_runs.*.lifecycle.triggers *dresources.JobRunTriggersState STATE
resources.job_runs.*.lifecycle.triggers []resources.JobRunTrigger INPUT
resources.job_runs.*.lifecycle.triggers.on_bundle_deploy string STATE
resources.job_runs.*.lifecycle.triggers[*] resources.JobRunTrigger INPUT
resources.job_runs.*.lifecycle.triggers[*].on_bundle_deploy *bool INPUT
resources.job_runs.*.lifecycle.triggers[*].on_file_change *string INPUT
resources.job_runs.*.lifecycle.triggers_state *resources.JobRunTriggersState INPUT STATE
resources.job_runs.*.lifecycle.triggers_state.on_bundle_deploy string INPUT STATE
resources.job_runs.*.lifecycle.triggers_state.on_file_change map[string]string INPUT STATE
resources.job_runs.*.lifecycle.triggers_state.on_file_change.* string INPUT STATE
resources.job_runs.*.modified_status string INPUT
resources.job_runs.*.notebook_params map[string]string ALL
resources.job_runs.*.notebook_params.* string ALL
Expand Down
25 changes: 1 addition & 24 deletions acceptance/bundle/resources/job_runs/on_bundle_deploy/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,7 @@ Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged

>>> jq .plan["resources.job_runs.my_run"].changes tmp.plan.json
{
"lifecycle": {
"action": "recreate",
"reason": "immutable",
"old": {
"triggers": {
"on_bundle_deploy": "[UUID]"
}
},
"new": {
"triggers": {
"on_bundle_deploy": "[UUID]"
}
}
},
"lifecycle.triggers.on_bundle_deploy": {
"lifecycle.triggers_state.on_bundle_deploy": {
"action": "recreate",
"reason": "immutable",
"old": "[UUID]",
Expand Down Expand Up @@ -108,15 +94,6 @@ Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged

>>> jq .plan["resources.job_runs.my_run"].changes tmp.plan.json
{
"lifecycle": {
"action": "skip",
"reason": "trigger removed",
"old": {
"triggers": {
"on_bundle_deploy": "[UUID]"
}
}
},
"result_state": {
"action": "skip",
"reason": "remote_already_set",
Expand Down
18 changes: 18 additions & 0 deletions acceptance/bundle/resources/job_runs/on_file_change/databricks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
bundle:
name: job-runs-on-file-change

resources:
jobs:
my_job:
name: my-job
tasks:
- task_key: main
notebook_task:
notebook_path: /Workspace/test

job_runs:
my_run:
job_id: ${resources.jobs.my_job.id}
lifecycle:
triggers:
- on_file_change: seed.txt
Comment thread
radakam marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"plan_version": [PLAN_VERSION],
"cli_version": "[CLI_VERSION]",
"plan": {
"resources.job_runs.my_run": {
"depends_on": [
{
"node": "resources.jobs.my_job",
"label": "${resources.jobs.my_job.id}"
}
],
"action": "create",
"new_state": {
"value": {
"job_id": 0,
"lifecycle": {
"triggers_state": {
"on_file_change": {
"seed.txt": "[FILE_HASH]"
}
}
},
"result_state": "SUCCESS"
},
"vars": {
"job_id": "${resources.jobs.my_job.id}"
}
}
},
"resources.jobs.my_job": {
"action": "create",
"new_state": {
"value": {
"deployment": {
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/job-runs-on-file-change/default/state/metadata.json"
},
"edit_mode": "UI_LOCKED",
"format": "MULTI_TASK",
"max_concurrent_runs": 1,
"name": "my-job",
"queue": {
"enabled": true
},
"tasks": [
{
"notebook_task": {
"notebook_path": "/Workspace/test"
},
"task_key": "main"
}
]
}
}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading