Skip to content

Commit de9567a

Browse files
authored
acc: Separate test output for direct and terraform for interactive_single_user test (#3768)
## Changes Separate test output for direct and terraform for interactive_single_user test ## Why TF test behaviour for wheel jobs on single-user interactive clusters is technically incorrect because TF in such a setup produces permanent drift (incorrect), which leads to cluster restart on each bundle deploy, and therefore wheel changes are picked up ``` # databricks_cluster.shared_autoscaling will be updated in-place ~ resource "databricks_cluster" "shared_autoscaling" { id = "1015-102652-xxxxxxx" - single_user_name = "aaaaaaaabbbb-bbbb-cccc-dddd-bb6ce382668a" -> null # (19 unchanged attributes hidden) # (1 unchanged block hidden) } ``` Direct does not update/restart the cluster on subsequent deploys (correct), and changes for the wheel are not picked, which is expected. I separated the test output into 2 separate files for now, to unlock the test. ## Tests Existing tests pass <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
1 parent 39feccf commit de9567a

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Hello from my func
2+
Got arguments:
3+
['my_test_code', 'one', 'two']
4+
Hello from my func
5+
Got arguments:
6+
['my_test_code', 'one', 'two']
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Hello from my func
2+
Got arguments:
3+
['my_test_code', 'one', 'two']
4+
UPDATED MY FUNC
5+
Got arguments:
6+
['my_test_code', 'one', 'two']

acceptance/bundle/integration_whl/interactive_single_user/output.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ Run URL: [DATABRICKS_URL]/?o=[NUMID]#job/[NUMID]/run/[NUMID]
4343

4444
[TIMESTAMP] "[default] Test Wheel Job [UNIQUE_NAME]" RUNNING
4545
[TIMESTAMP] "[default] Test Wheel Job [UNIQUE_NAME]" TERMINATED SUCCESS
46-
Hello from my func
47-
Got arguments:
48-
['my_test_code', 'one', 'two']
4946

5047
=== Make a change to code without version change and run the job again
5148
>>> [CLI] bundle deploy
@@ -61,9 +58,6 @@ Run URL: [DATABRICKS_URL]/?o=[NUMID]#job/[NUMID]/run/[NUMID]
6158

6259
[TIMESTAMP] "[default] Test Wheel Job [UNIQUE_NAME]" RUNNING
6360
[TIMESTAMP] "[default] Test Wheel Job [UNIQUE_NAME]" TERMINATED SUCCESS
64-
UPDATED MY FUNC
65-
Got arguments:
66-
['my_test_code', 'one', 'two']
6761

6862
>>> [CLI] bundle destroy --auto-approve
6963
The following resources will be deleted:

acceptance/bundle/integration_whl/interactive_single_user/script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ trace cat databricks.yml
44
cp -r $TESTDIR/../interactive_cluster/{setup.py,my_test_code} .
55
trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT
66
trace $CLI bundle deploy
7-
trace $CLI bundle run some_other_job
7+
trace $CLI bundle run some_other_job > out.$DATABRICKS_BUNDLE_ENGINE.txt
88

99
title "Make a change to code without version change and run the job again"
1010
update_file.py my_test_code/__main__.py 'Hello from my func' 'UPDATED MY FUNC'
1111
trace $CLI bundle deploy
12-
trace $CLI bundle run some_other_job
12+
trace $CLI bundle run some_other_job >> out.$DATABRICKS_BUNDLE_ENGINE.txt

0 commit comments

Comments
 (0)