-
Notifications
You must be signed in to change notification settings - Fork 234
Speed up loading bundles with many included files #6195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
janniklasrose
merged 11 commits into
main
from
janniklasrose/bundle-large-number-of-includes
Sep 16, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
66cb8ab
Speed up loading bundles with many included files
janniklasrose f448601
PR link
janniklasrose 65edb5f
acc: plan a bundle whose resources span multiple included files
janniklasrose b639f73
Merge remote-tracking branch 'origin/main' into janniklasrose/bundle-…
janniklasrose 398a950
acc: drop redundant test.toml from plan_multifile
janniklasrose e10cb5e
Add unit tests for ApplySeqInScopeContext
janniklasrose e6bcc9e
acc: verify include locations survive the in-scope merge
janniklasrose 0781196
Drop redundant cross-file merge unit test
janniklasrose a2f0680
Merge remote-tracking branch 'origin/main' into janniklasrose/bundle-…
janniklasrose efe6d6b
regenerate out.test.toml
janniklasrose bfd593d
fix nextchanges
janniklasrose File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * Improved configuration load time for bundles with many included files. ([#6195](https://github.com/databricks/cli/pull/6195)) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| bundle: | ||
| name: plan_multifile | ||
|
|
||
| # Resources are spread across separate files matched by two globs, plus one job | ||
| # defined directly in the root file. The plan must account for every one of them. | ||
| include: | ||
| - resources/*.yml | ||
| - resources/*/*.yml | ||
|
|
||
| resources: | ||
| jobs: | ||
| root_job: | ||
| name: root_job | ||
|
|
||
| targets: | ||
| dev: | ||
| default: true | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
|
|
||
| >>> [CLI] bundle plan | ||
| Warning: unknown field: unknown_field | ||
| at resources.jobs.job_d | ||
| in resources/nested/job_d.yml:8:7 | ||
|
|
||
| create jobs.job_a | ||
| create jobs.job_b | ||
| create jobs.job_d | ||
| create jobs.root_job | ||
| create pipelines.pipeline_c | ||
|
|
||
| Plan: 5 to add, 0 to change, 0 to delete, 0 unchanged | ||
|
|
||
| === job_a merged max_concurrent_runs from the override file | ||
| 4 |
8 changes: 8 additions & 0 deletions
8
acceptance/bundle/includes/plan_multifile/resources/job_a.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| resources: | ||
| jobs: | ||
| job_a: | ||
| name: job_a | ||
| tasks: | ||
| - task_key: main | ||
| notebook_task: | ||
| notebook_path: ./nb.py |
8 changes: 8 additions & 0 deletions
8
acceptance/bundle/includes/plan_multifile/resources/job_b.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| resources: | ||
| jobs: | ||
| job_b: | ||
| name: job_b | ||
| tasks: | ||
| - task_key: main | ||
| notebook_task: | ||
| notebook_path: ./nb.py |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Databricks notebook source | ||
| print("hello") |
12 changes: 12 additions & 0 deletions
12
acceptance/bundle/includes/plan_multifile/resources/nested/job_d.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| resources: | ||
| jobs: | ||
| job_d: | ||
| name: job_d | ||
| # Unknown field in a nested included file. `bundle validate` must report its | ||
| # location as this file, which verifies that source locations survive the | ||
| # in-scope include merge this PR introduces for load performance. | ||
| unknown_field: true | ||
| tasks: | ||
| - task_key: main | ||
| notebook_task: | ||
| notebook_path: ../nb.py |
9 changes: 9 additions & 0 deletions
9
acceptance/bundle/includes/plan_multifile/resources/override_job_a.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Target override for job_a lives in a different file than its base definition. | ||
| # UniqueResourceKeys allows a resource to span files inside a target block, so this | ||
| # must merge into job_a rather than error or produce a second resource. | ||
| targets: | ||
| dev: | ||
| resources: | ||
| jobs: | ||
| job_a: | ||
| max_concurrent_runs: 4 |
7 changes: 7 additions & 0 deletions
7
acceptance/bundle/includes/plan_multifile/resources/pipeline_c.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| resources: | ||
| pipelines: | ||
| pipeline_c: | ||
| name: pipeline_c | ||
| libraries: | ||
| - notebook: | ||
| path: ./nb.py |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Every resource defined across the included files (two globs + the root file) must | ||
| # appear in the plan exactly once, and the cross-file target override must merge into | ||
| # job_a rather than be dropped. The unknown field in resources/nested/job_d.yml is | ||
| # reported against that file, verifying source locations survive the in-scope include | ||
| # merge this PR introduces for load performance. | ||
| trace $CLI bundle plan | ||
|
|
||
| title "job_a merged max_concurrent_runs from the override file\n" | ||
| # The located warning is already asserted by the plan above; drop the duplicate here so | ||
| # this step only shows the merged value. | ||
| trace $CLI bundle validate -o json 2>/dev/null | jq '.resources.jobs.job_a.max_concurrent_runs' |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.