Skip to content

Commit 7b688b4

Browse files
authored
Merge branch 'main' into simonfaltum/pydabs-profile-env
2 parents 9f0f669 + f0edaa4 commit 7b688b4

21 files changed

Lines changed: 595 additions & 16 deletions

File tree

NEXT_CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# NEXT CHANGELOG
22

3-
## Release v0.300.0
3+
## Release v0.299.2
44

55
### CLI
66

77
### Bundles
88

99
* 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.
10+
* Fixed `--force-pull` on `bundle summary` and `bundle open` so the flag bypasses the local state cache and reads state from the workspace.
1011

1112
### Dependency updates

acceptance/bundle/invariant/continue_293/test.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ EnvMatrixExclude.no_vector_search_endpoint = ["INPUT_CONFIG=vector_search_endpoi
1111

1212
# Dotted pipeline configuration keys are not supported on v0.293.0
1313
EnvMatrixExclude.no_pipeline_config_dots = ["INPUT_CONFIG=pipeline_config_dots.yml.tmpl"]
14+
15+
# The 1000-task scale case is covered by no_drift. Running it here adds ~1.5 min
16+
# per variant (two full deploys at 1000 tasks) without incremental coverage.
17+
EnvMatrixExclude.no_pydabs_1000_tasks = ["INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl"]

acceptance/bundle/invariant/migrate/test.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ EnvMatrixExclude.no_grant_ref = ["INPUT_CONFIG=schema_grant_ref.yml.tmpl"]
1919

2020
# SQL warehouses currently failing with migration with permanent drift. TODO: fix this.
2121
EnvMatrixExclude.no_sql_warehouse = ["INPUT_CONFIG=sql_warehouse.yml.tmpl"]
22+
23+
# The 1000-task scale case is covered by no_drift. Running it here adds ~1.5 min
24+
# per variant (deploy + migrate + plan at 1000 tasks) without incremental coverage.
25+
EnvMatrixExclude.no_pydabs_1000_tasks = ["INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl"]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
bundle:
2+
name: force-pull-commands
3+
4+
resources:
5+
jobs:
6+
foo:
7+
name: foo
8+
tasks:
9+
- task_key: task
10+
spark_python_task:
11+
python_file: ./foo.py
12+
environment_key: default
13+
environments:
14+
- environment_key: default
15+
spec:
16+
client: "2"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("hello")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
echo "I AM BROWSER"

acceptance/bundle/state/force_pull_commands/out.test.toml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
>>> [CLI] bundle deploy
3+
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/force-pull-commands/default/files...
4+
Deploying resources...
5+
Updating deployment state...
6+
Deployment complete!
7+
8+
=== Modify PATH so that real open is not run
9+
=== bundle summary without --force-pull: no remote state read
10+
11+
>>> [CLI] bundle summary
12+
13+
=== bundle summary --force-pull: remote state read
14+
15+
>>> [CLI] bundle summary --force-pull
16+
{
17+
"method": "GET",
18+
"path": "/api/2.0/workspace-files/Workspace/Users/[USERNAME]/.bundle/force-pull-commands/default/state/STATE_FILENAME"
19+
}
20+
21+
=== bundle open without --force-pull: no remote state read
22+
23+
>>> [CLI] bundle open foo
24+
Opening browser at [DATABRICKS_URL]/jobs/[NUMID]?o=[NUMID]
25+
Error: exec: "open": cannot run executable found relative to current directory
26+
27+
=== bundle open --force-pull: remote state read
28+
29+
>>> [CLI] bundle open foo --force-pull
30+
Opening browser at [DATABRICKS_URL]/jobs/[NUMID]?o=[NUMID]
31+
Error: exec: "open": cannot run executable found relative to current directory
32+
{
33+
"method": "GET",
34+
"path": "/api/2.0/workspace-files/Workspace/Users/[USERNAME]/.bundle/force-pull-commands/default/state/STATE_FILENAME"
35+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
trace $CLI bundle deploy > /dev/null
2+
rm -f out.requests.txt
3+
4+
title "Modify PATH so that real open is not run"
5+
export PATH=.:$PATH
6+
7+
title "bundle summary without --force-pull: no remote state read\n"
8+
trace $CLI bundle summary > /dev/null
9+
print_requests.py --get //workspace-files/
10+
11+
title "bundle summary --force-pull: remote state read\n"
12+
trace $CLI bundle summary --force-pull > /dev/null
13+
print_requests.py --get //workspace-files/
14+
15+
title "bundle open without --force-pull: no remote state read\n"
16+
musterr trace $CLI bundle open foo > /dev/null
17+
print_requests.py --get //workspace-files/
18+
19+
title "bundle open --force-pull: remote state read\n"
20+
musterr trace $CLI bundle open foo --force-pull > /dev/null
21+
print_requests.py --get //workspace-files/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Local = true
2+
Cloud = false
3+
RecordRequests = true
4+
5+
# bundle open opens a browser; restrict to darwin to get stable output
6+
# (mirrors acceptance/bundle/open/test.toml).
7+
GOOS.windows = false
8+
GOOS.linux = false
9+
10+
Ignore = [".databricks"]
11+
12+
[EnvMatrix]
13+
DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"]
14+
15+
[[Repls]]
16+
Old = '(resources\.json|terraform\.tfstate)'
17+
New = 'STATE_FILENAME'

0 commit comments

Comments
 (0)