Skip to content

Add job_runs lifecycle.triggers.on_value_change - #6341

Open
radakam wants to merge 2 commits into
deco-job-runs-lifecycle-on-file-changefrom
deco-job-runs-lifecycle-on-value-change
Open

Add job_runs lifecycle.triggers.on_value_change#6341
radakam wants to merge 2 commits into
deco-job-runs-lifecycle-on-file-changefrom
deco-job-runs-lifecycle-on-value-change

Conversation

@radakam

@radakam radakam commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Changes

Add lifecycle.triggers.on_value_change for resources.job_runs (direct engine). The run is recreated when the resolved expression changes. ${resources.*} refs become deploy-graph dependencies. Multiple triggers are separate list entries (one key each). Removing the trigger updates state only and does not start a new run.

Why

job_runs already support on_bundle_deploy and on_file_change. Watching a resolved value (variable or resource id) is the remaining trigger from the job_runs design, so a run can re-fire when an upstream resource or interpolated value changes.

Tests

  • Unit: validate_job_run_triggers (empty/whitespace/two-keys/prevent_destroy), PrepareState/PrepareInputConfig, DropJobRunValueChangeConfigRefs, OverrideChangeDesc (remove vs change).
  • Acceptance on_value_change: two expressions; changing one var recreates (other fingerprint stays); removing both triggers is an update with no run-now.
  • Acceptance on_value_change_ref: concatenated ${resources.jobs.other.id}-${resources.jobs.extra.id}; depends_on includes both jobs; persisted state is [OTHER_ID]-[EXTRA_ID]; READPLAN="" and READPLAN=1.

Re-fire a run when a resolved expression changes, including resource refs that become deploy-graph edges. Removing the trigger is a state-only update.
@radakam
radakam marked this pull request as ready for review August 21, 2026 15:59
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

10 files changed
Suggested: @denik
Also eligible: @janniklasrose, @pietern, @andrewnester, @shreyas-goenka, @lennartkats-db, @anton-107

/bundle/ - needs approval

9 files changed
Suggested: @denik
Also eligible: @janniklasrose, @pietern, @andrewnester, @shreyas-goenka, @lennartkats-db, @anton-107

General files (require maintainer)

Files: .nextchanges/bundles/job-runs-on-value-change.md
Based on git history:

  • @denik -- recent work in bundle/direct/, .nextchanges/bundles/, bundle/internal/schema/

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.

Include the on_value_change input and state paths required by generated-file validation.
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 0db1f4b

Run: 32501859075

Env ❌​FAIL 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
❌​ aws linux 2 1 3 4 286 1165 11:37
❌​ aws windows 2 1 3 4 288 1163 17:43
❌​ azure linux 2 1 3 4 285 1165 10:11
❌​ azure windows 2 1 3 4 287 1163 14:24
❌​ gcp linux 2 2 4 286 1165 13:23
❌​ gcp windows 2 2 4 288 1163 16:15
10 interesting tests: 4 SKIP, 2 KNOWN, 2 FAIL, 2 RECOVERED
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
❌​ TestAccept/bundle/resources/job_runs/failed_run ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/job_runs/failed_run/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
🙈​ 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 🟨​K 🟨​K
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R

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