You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dependencies must reference an existing ${resources.job_runs.<name>.id}. A dependent run starts only after all referenced runs finish successfully. The resolved run IDs are stored in local deployment state and are not sent to the Jobs API. When an upstream run receives a new run ID, its dependents are re-triggered. This also resumes waiting for an in-progress upstream run when the previous deployment was interrupted.
Why
The direct deployment engine already orders resources through cross-resource references, and Job Run deployment already waits for each run to finish successfully.
However, there was no explicit way to declare ordering between Job Runs. Users have to place a reference such as ${resources.job_runs.prepare.state.result_state} in an unrelated request field, such as a job parameter. This created the necessary dependency-graph edge, but mixed deployment ordering with data sent to the job.
depends_on provides a clear, local-only mechanism while reusing the existing reference-based dependency graph and cycle detection.
The interrupted-deployment handling is also necessary because an in-progress Job Run is planned as unchanged. Without resuming its abandoned wait, the deployment could release its dependents before that run finished.
Tests
Added validation tests for valid, malformed, and undefined Job Run dependencies.
Added planner tests verifying that depends_on creates dependency-graph references.
Added resource tests covering state persistence and ensuring depends_on is not sent to the Jobs API.
Extended the interrupted Job Run acceptance test to verify that:
downstream runs remain blocked when the upstream wait fails;
the next deployment resumes waiting for the existing upstream run;
the downstream run starts only after the upstream run succeeds.
Regenerated the bundle JSON schema, reference schema, and PyDABs models.
Ran focused Go tests.
Ran Job Run and reference-schema acceptance tests.
Ran the PyDABs test suite: 496 passed.
Ran ./task lint-q, ./task checks, and git diff --check.
Files: python/databricks/bundles/job_runs/_models/job_run.py, python/databricks_tests/core/_generated/job_runs.py
Based on git history:
@denik -- recent work in bundle/direct/dresources/, bundle/direct/, bundle/config/validate/
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Add a depends_on field for ordering bundle Job Runs:
Dependencies must reference an existing
${resources.job_runs.<name>.id}. A dependent run starts only after all referenced runs finish successfully. The resolved run IDs are stored in local deployment state and are not sent to the Jobs API. When an upstream run receives a new run ID, its dependents are re-triggered. This also resumes waiting for an in-progress upstream run when the previous deployment was interrupted.Why
The direct deployment engine already orders resources through cross-resource references, and Job Run deployment already waits for each run to finish successfully.
However, there was no explicit way to declare ordering between Job Runs. Users have to place a reference such as
${resources.job_runs.prepare.state.result_state}in an unrelated request field, such as a job parameter. This created the necessary dependency-graph edge, but mixed deployment ordering with data sent to the job.depends_onprovides a clear, local-only mechanism while reusing the existing reference-based dependency graph and cycle detection.The interrupted-deployment handling is also necessary because an in-progress Job Run is planned as unchanged. Without resuming its abandoned wait, the deployment could release its dependents before that run finished.
Tests