File tree Expand file tree Collapse file tree 9 files changed +72
-17
lines changed
acceptance/bundle/templates/default-python/combinations Expand file tree Collapse file tree 9 files changed +72
-17
lines changed Original file line number Diff line number Diff line change 33import os
44import subprocess
55
6- SERVERLESS = os .environ ["S " ] == "yes"
7- INCLUDE_PYTHON = os .environ ["P " ] == "yes"
6+ SERVERLESS = os .environ ["SERVERLESS " ] == "yes"
7+ INCLUDE_PYTHON = os .environ ["PY " ] == "yes"
88
99CLOUD_ENV = os .environ .get ("CLOUD_ENV" )
1010if CLOUD_ENV and SERVERLESS and not os .environ .get ("TEST_METASTORE_ID" ):
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ Workspace:
3131
3232Validation OK!
3333
34- >>> ../check_output.py [CLI] bundle deploy -t dev
34+ >>> [TESTROOT]/bundle/templates/default-python/combinations/classic/ ../check_output.py [CLI] bundle deploy -t dev
3535Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/X[UNIQUE_NAME]/dev/files...
3636Deploying resources...
3737Deployment complete!
Original file line number Diff line number Diff line change 1- envsubst < input.json.tmpl > input.json
1+ envsubst < $TESTDIR/../ input.json.tmpl > input.json
22trace $CLI bundle init default-python --config-file ./input.json
33
44cd ./X*
55trace yamlcheck.py
66trace $CLI bundle validate -t dev
77trace $CLI bundle validate -t prod
88
9- trace ../check_output.py $CLI bundle deploy -t dev
9+ trace $TESTDIR/ ../check_output.py $CLI bundle deploy -t dev
1010
1111# Fails on testserver with: Error: Method Not Allowed
1212#trace ../check_output.py $CLI bundle deploy -t prod
1313
14- # Do not affect this repository's git behaviour #2318
15- mv .gitignore out.gitignore
16- rm .databricks/.gitignore
1714cd ..
1815rm -fr X*
Original file line number Diff line number Diff line change 1+ Env.SERVERLESS = " no"
Original file line number Diff line number Diff line change 11{
22 " project_name" : " X$UNIQUE_NAME" ,
3- " include_notebook" : " $N " ,
4- " include_dlt" : " $D " ,
5- " include_python" : " $P " ,
6- " serverless" : " $S "
3+ " include_notebook" : " $NBOOK " ,
4+ " include_dlt" : " $DLT " ,
5+ " include_python" : " $PY " ,
6+ " serverless" : " $SERVERLESS "
77}
Original file line number Diff line number Diff line change 1+
2+ >>> [CLI] bundle init default-python --config-file ./input.json
3+
4+ Welcome to the default Python template for Databricks Asset Bundles!
5+ Workspace to use (auto-detected, edit in 'X[UNIQUE_NAME]/databricks.yml'): [DATABRICKS_URL]
6+
7+ ✨ Your new project has been created in the 'X[UNIQUE_NAME]' directory!
8+
9+ Please refer to the README.md file for "getting started" instructions.
10+ See also the documentation at https://docs.databricks.com/dev-tools/bundles/index.html.
11+
12+ >>> yamlcheck.py
13+
14+ >>> [CLI] bundle validate -t dev
15+ Name: X[UNIQUE_NAME]
16+ Target: dev
17+ Workspace:
18+ Host: [DATABRICKS_URL]
19+ User: [USERNAME]
20+ Path: /Workspace/Users/[USERNAME]/.bundle/X[UNIQUE_NAME]/dev
21+
22+ Validation OK!
23+
24+ >>> [CLI] bundle validate -t prod
25+ Name: X[UNIQUE_NAME]
26+ Target: prod
27+ Workspace:
28+ Host: [DATABRICKS_URL]
29+ User: [USERNAME]
30+ Path: /Workspace/Users/[USERNAME]/.bundle/X[UNIQUE_NAME]/prod
31+
32+ Validation OK!
33+
34+ >>> [TESTROOT]/bundle/templates/default-python/combinations/serverless/../check_output.py [CLI] bundle deploy -t dev
35+ Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/X[UNIQUE_NAME]/dev/files...
36+ Deploying resources...
37+ Deployment complete!
Original file line number Diff line number Diff line change 1+ envsubst < $TESTDIR/../input.json.tmpl > input.json
2+ trace $CLI bundle init default-python --config-file ./input.json
3+
4+ cd ./X*
5+ trace yamlcheck.py
6+ trace $CLI bundle validate -t dev
7+ trace $CLI bundle validate -t prod
8+
9+ trace $TESTDIR/../check_output.py $CLI bundle deploy -t dev
10+
11+ # Fails on testserver with: Error: Method Not Allowed
12+ #trace ../check_output.py $CLI bundle deploy -t prod
13+
14+ cd ..
15+ rm -fr X*
Original file line number Diff line number Diff line change 1+ Env.SERVERLESS = " yes"
Original file line number Diff line number Diff line change @@ -4,17 +4,21 @@ Ignore = ["input.json"]
44
55# Using shortcuts, because max path component name on Windows is 256 chars
66# INCLUDE_NOTEBOOK
7- EnvMatrix.N = [" yes" , " no" ]
7+ EnvMatrix.NBOOK = [" yes" , " no" ]
88
99# INCLUDE_DLT
10- EnvMatrix.D = [" yes" , " no" ]
10+ EnvMatrix.DLT = [" yes" , " no" ]
1111
1212# INCLUDE_PYTHON
13- EnvMatrix.P = [" yes" , " no" ]
13+ EnvMatrix.PY = [" yes" , " no" ]
1414
15- # SERVERLESS
16- EnvMatrix.S = [" yes" , " no" ]
15+ # SERVERLESS -- configured in subtest
16+ # EnvMatrix.S = ["yes", "no"]
1717
1818[[Repls ]]
1919Old = ' 202\d{5}.\d{5,}'
2020New = ' [VERSION_TIMESTAMP]'
21+
22+ [[Repls ]]
23+ Old = ' \\'
24+ New = ' /'
You can’t perform that action at this time.
0 commit comments