Skip to content

Commit 9df5e93

Browse files
Merge remote-tracking branch 'origin/main' into jb/aitools-move-only
2 parents 9e5bcbc + 975bf0c commit 9df5e93

37 files changed

Lines changed: 801 additions & 462 deletions

File tree

NEXT_CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
* Marked the default profile in the interactive pickers shown by `databricks auth switch`, `databricks auth logout`, `databricks auth token`, and `databricks auth login`, and moved it to the top of the list. `databricks auth login` and `databricks auth logout` now offer the same selectors as `databricks auth token` and `databricks auth switch` respectively.
1212

1313
### Bundles
14+
* Stop applying `presets.name_prefix` (and the dev-mode `[dev <user>]` rename) to `vector_search_endpoints` ([#5209](https://github.com/databricks/cli/pull/5209)).
1415

16+
* Fix `bundle generate` job to preserve nested notebook directory structure ([#4596](https://github.com/databricks/cli/pull/4596))
1517
* Propagate authentication environment (including `DATABRICKS_CONFIG_PROFILE`) to the `experimental.python` subprocess so bundle validate/deploy no longer fails with a multi-profile host ambiguity error when several profiles in `~/.databrickscfg` share the same host.
1618
* Fixed `--force-pull` on `bundle summary` and `bundle open` so the flag bypasses the local state cache and reads state from the workspace.
1719

acceptance/bundle/debug/list-targets/databricks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ targets:
1515
mode: development
1616
workspace:
1717
host: https://dev.example.com
18-
staging: {}
18+
staging:
1919
prod:
2020
mode: production
2121
workspace:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bundle:
2+
name: nested_notebooks
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
resources:
2+
jobs:
3+
out:
4+
name: dev.my_repo.my_job
5+
tasks:
6+
- task_key: my_notebook_task
7+
notebook_task:
8+
notebook_path: src/my_folder/my_notebook.py
9+
- task_key: other_notebook_task
10+
notebook_task:
11+
notebook_path: src/other_folder/other_notebook.py

acceptance/bundle/generate/job_nested_notebooks/out.test.toml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
File successfully saved to src/my_folder/my_notebook.py
2+
File successfully saved to src/other_folder/other_notebook.py
3+
Job configuration successfully saved to out.job.yml
4+
=== old flattened files should be gone ===
5+
src/my_notebook.py removed
6+
src/other_notebook.py removed
7+
=== new nested files ===
8+
src/my_folder/my_notebook.py
9+
src/other_folder/other_notebook.py
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
mkdir -p src
2+
echo "old" > src/my_notebook.py
3+
echo "old" > src/other_notebook.py
4+
5+
$CLI bundle generate job --existing-job-id 1234 --config-dir . --key out --force --source-dir src 2>&1 | sort
6+
7+
echo "=== old flattened files should be gone ==="
8+
test ! -f src/my_notebook.py && echo "src/my_notebook.py removed" || echo "src/my_notebook.py still exists"
9+
test ! -f src/other_notebook.py && echo "src/other_notebook.py removed" || echo "src/other_notebook.py still exists"
10+
11+
echo "=== new nested files ==="
12+
find src -type f | sort
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Ignore = ["src"]
2+
3+
[[Server]]
4+
Pattern = "GET /api/2.2/jobs/get"
5+
Response.Body = '''
6+
{
7+
"job_id": 11223344,
8+
"settings": {
9+
"name": "dev.my_repo.my_job",
10+
"tasks": [
11+
{
12+
"task_key": "my_notebook_task",
13+
"notebook_task": {
14+
"notebook_path": "/my_data_product/dev/my_folder/my_notebook"
15+
}
16+
},
17+
{
18+
"task_key": "other_notebook_task",
19+
"notebook_task": {
20+
"notebook_path": "/my_data_product/dev/other_folder/other_notebook"
21+
}
22+
}
23+
]
24+
}
25+
}
26+
'''
27+
28+
[[Server]]
29+
Pattern = "GET /api/2.0/workspace/get-status"
30+
Response.Body = '''
31+
{
32+
"object_type": "NOTEBOOK",
33+
"language": "PYTHON",
34+
"repos_export_format": "SOURCE"
35+
}
36+
'''
37+
38+
[[Server]]
39+
Pattern = "GET /api/2.0/workspace/export"
40+
Response.Body = '''
41+
print("Hello, World!")
42+
'''
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bundle:
2+
name: python_job_and_deploy

acceptance/bundle/generate/python_job_and_deploy/out.test.toml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)