-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable default-python tests on the cloud
- Loading branch information
Showing
6 changed files
with
77 additions
and
5 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
acceptance/bundle/templates/default-python/classic-cloud/out.compare-vs-local.diff
This file contains 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,19 @@ | ||
--- [TESTROOT]/bundle/templates/default-python/classic-cloud/../classic/output/my_default_python/databricks.yml | ||
+++ output/my_default_python/databricks.yml | ||
@@ -26,4 +26,4 @@ | ||
root_path: /Workspace/Users/[USERNAME]/.bundle/${bundle.name}/${bundle.target} | ||
permissions: | ||
- - user_name: [USERNAME] | ||
+ - service_principal_name: [USERNAME] | ||
level: CAN_MANAGE | ||
--- [TESTROOT]/bundle/templates/default-python/classic-cloud/../classic/output/my_default_python/resources/my_default_python.job.yml | ||
+++ output/my_default_python/resources/my_default_python.job.yml | ||
@@ -10,8 +10,4 @@ | ||
interval: 1 | ||
unit: DAYS | ||
- | ||
- email_notifications: | ||
- on_failure: | ||
- - [USERNAME] | ||
|
||
tasks: |
30 changes: 30 additions & 0 deletions
30
acceptance/bundle/templates/default-python/classic-cloud/output.txt
This file contains 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,30 @@ | ||
|
||
>>> [CLI] bundle init default-python --config-file [TESTROOT]/bundle/templates/default-python/classic-cloud/../classic/input.json --output-dir output | ||
|
||
Welcome to the default Python template for Databricks Asset Bundles! | ||
Workspace to use (auto-detected, edit in 'my_default_python/databricks.yml'): [DATABRICKS_URL] | ||
|
||
✨ Your new project has been created in the 'my_default_python' directory! | ||
|
||
Please refer to the README.md file for "getting started" instructions. | ||
See also the documentation at https://docs.databricks.com/dev-tools/bundles/index.html. | ||
|
||
>>> [CLI] bundle validate -t dev | ||
Name: my_default_python | ||
Target: dev | ||
Workspace: | ||
Host: [DATABRICKS_URL] | ||
User: [USERNAME] | ||
Path: /Workspace/Users/[USERNAME]/.bundle/my_default_python/dev | ||
|
||
Validation OK! | ||
|
||
>>> [CLI] bundle validate -t prod | ||
Name: my_default_python | ||
Target: prod | ||
Workspace: | ||
Host: [DATABRICKS_URL] | ||
User: [USERNAME] | ||
Path: /Workspace/Users/[USERNAME]/.bundle/my_default_python/prod | ||
|
||
Validation OK! |
15 changes: 15 additions & 0 deletions
15
acceptance/bundle/templates/default-python/classic-cloud/script
This file contains 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,15 @@ | ||
trace $CLI bundle init default-python --config-file $TESTDIR/../classic/input.json --output-dir output | ||
|
||
cd output/my_default_python | ||
trace $CLI bundle validate -t dev | ||
trace $CLI bundle validate -t prod | ||
|
||
# Do not affect this repository's git behaviour #2318 | ||
mv .gitignore out.gitignore | ||
|
||
cd ../../ | ||
|
||
# Calculate the difference from the classic template run against fake stub | ||
diff.py $TESTDIR/../classic/output output/ > out.compare-vs-local.diff | ||
|
||
rm -fr output |
11 changes: 11 additions & 0 deletions
11
acceptance/bundle/templates/default-python/classic-cloud/test.toml
This file contains 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 @@ | ||
Local = false | ||
Cloud = true | ||
|
||
[[Repls]] | ||
Old = '\bnode_type_id: [0-9a-zA-Z_.-]+\b' | ||
New = 'node_type_id: (redacted)' | ||
|
||
[[Repls]] | ||
# windows fix | ||
Old = '\\' | ||
New = '/' |
This file contains 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# At the moment, there are many differences across different envs w.r.t to catalog use, node type and so on. | ||
# There are many differences across envs, so there are dedicated tests (suffixed with -cloud) for cloud envs. | ||
Cloud = false |
This file contains 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