Skip to content

Commit 5fdbd95

Browse files
authored
acc: cleanup debuglog test output (#3590)
After rate limit was disabled in #3581 this test became flaky. The ApplyParallel lines are already logged in order but the output of those mutator appears as it comes. This PR filters out the SDK request traces + request in question that can change order. ``` === FAIL: acceptance TestAccept/bundle/debuglog/DATABRICKS_CLI_DEPLOYMENT=direct-exp (0.04s) acceptance_test.go:1336: Writing updated bundle config to databricks.yml. BundleConfig sections: default_name acceptance_test.go:803: Diff: --- bundle/debuglog/out.stderr.direct-exp.txt +++ /tmp/TestAcceptbundledebuglogDATABRICKS_CLI_DEPLOYMENT=direct-exp1521238718/001/out.stderr.direct-exp.txt @@ -70,8 +70,6 @@ 10:07:59 Debug: ApplyParallel pid=12345 mutator=validate:folder_permissions 10:07:59 Debug: ApplyParallel pid=12345 mutator=validate:validate_sync_patterns 10:07:59 Debug: ApplyParallel pid=12345 mutator=fast_validate(readonly) mutator=validate:job_cluster_key_defined -10:07:59 Debug: ApplyParallel pid=12345 mutator=fast_validate(readonly) mutator=validate:job_task_cluster_spec -10:07:59 Debug: ApplyParallel pid=12345 mutator=fast_validate(readonly) mutator=validate:artifact_paths 10:07:59 Debug: GET /api/2.0/workspace/get-status?path=/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files < HTTP/1.1 404 Not Found < { @@ -83,6 +81,8 @@ > "path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files" > } < HTTP/1.1 200 OK pid=12345 mutator=validate:files_to_sync sdk=true +10:07:59 Debug: ApplyParallel pid=12345 mutator=fast_validate(readonly) mutator=validate:job_task_cluster_spec +10:07:59 Debug: ApplyParallel pid=12345 mutator=fast_validate(readonly) mutator=validate:artifact_paths 10:07:59 Debug: GET /api/2.0/workspace/get-status?path=/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files < HTTP/1.1 200 OK < { ```
1 parent fb1fce2 commit 5fdbd95

File tree

3 files changed

+4
-37
lines changed

3 files changed

+4
-37
lines changed

acceptance/bundle/debuglog/out.stderr.direct-exp.txt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
10:07:59 Debug: Apply pid=12345 mutator=SyncInferRoot
2525
10:07:59 Debug: Apply pid=12345 mutator=PopulateCurrentUser
2626
10:07:59 Debug: GET /api/2.0/preview/scim/v2/Me
27-
< HTTP/1.1 200 OK
28-
< {
29-
< "id": "[USERID]",
30-
< "userName": "[USERNAME]"
31-
< } pid=12345 mutator=PopulateCurrentUser sdk=true
3227
10:07:59 Debug: Apply pid=12345 mutator=LoadGitDetails
3328
10:07:59 Debug: Apply pid=12345 mutator=ApplySourceLinkedDeploymentPreset
3429
10:07:59 Debug: Apply pid=12345 mutator=DefineDefaultWorkspaceRoot
@@ -73,22 +68,9 @@
7368
10:07:59 Debug: ApplyParallel pid=12345 mutator=fast_validate(readonly) mutator=validate:job_task_cluster_spec
7469
10:07:59 Debug: ApplyParallel pid=12345 mutator=fast_validate(readonly) mutator=validate:artifact_paths
7570
10:07:59 Debug: GET /api/2.0/workspace/get-status?path=/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files
76-
< HTTP/1.1 404 Not Found
77-
< {
78-
< "message": "Workspace path not found"
79-
< } pid=12345 mutator=validate:files_to_sync sdk=true
8071
10:07:59 Debug: non-retriable error: Workspace path not found pid=12345 mutator=validate:files_to_sync sdk=true
8172
10:07:59 Debug: POST /api/2.0/workspace/mkdirs
82-
> {
83-
> "path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
84-
> }
85-
< HTTP/1.1 200 OK pid=12345 mutator=validate:files_to_sync sdk=true
8673
10:07:59 Debug: GET /api/2.0/workspace/get-status?path=/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files
87-
< HTTP/1.1 200 OK
88-
< {
89-
< "object_type": "DIRECTORY",
90-
< "path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
91-
< } pid=12345 mutator=validate:files_to_sync sdk=true
9274
10:07:59 Debug: Path /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files has type directory (ID: 0) pid=12345 mutator=validate:files_to_sync
9375
10:07:59 Info: completed execution pid=12345 exit_code=0
9476
10:07:59 Debug: no telemetry logs to upload pid=12345

acceptance/bundle/debuglog/out.stderr.terraform.txt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
10:07:59 Debug: Apply pid=12345 mutator=SyncInferRoot
2525
10:07:59 Debug: Apply pid=12345 mutator=PopulateCurrentUser
2626
10:07:59 Debug: GET /api/2.0/preview/scim/v2/Me
27-
< HTTP/1.1 200 OK
28-
< {
29-
< "id": "[USERID]",
30-
< "userName": "[USERNAME]"
31-
< } pid=12345 mutator=PopulateCurrentUser sdk=true
3227
10:07:59 Debug: Apply pid=12345 mutator=LoadGitDetails
3328
10:07:59 Debug: Apply pid=12345 mutator=ApplySourceLinkedDeploymentPreset
3429
10:07:59 Debug: Apply pid=12345 mutator=DefineDefaultWorkspaceRoot
@@ -77,22 +72,9 @@
7772
10:07:59 Debug: ApplyParallel pid=12345 mutator=fast_validate(readonly) mutator=validate:job_task_cluster_spec
7873
10:07:59 Debug: ApplyParallel pid=12345 mutator=fast_validate(readonly) mutator=validate:artifact_paths
7974
10:07:59 Debug: GET /api/2.0/workspace/get-status?path=/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files
80-
< HTTP/1.1 404 Not Found
81-
< {
82-
< "message": "Workspace path not found"
83-
< } pid=12345 mutator=validate:files_to_sync sdk=true
8475
10:07:59 Debug: non-retriable error: Workspace path not found pid=12345 mutator=validate:files_to_sync sdk=true
8576
10:07:59 Debug: POST /api/2.0/workspace/mkdirs
86-
> {
87-
> "path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
88-
> }
89-
< HTTP/1.1 200 OK pid=12345 mutator=validate:files_to_sync sdk=true
9077
10:07:59 Debug: GET /api/2.0/workspace/get-status?path=/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files
91-
< HTTP/1.1 200 OK
92-
< {
93-
< "object_type": "DIRECTORY",
94-
< "path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
95-
< } pid=12345 mutator=validate:files_to_sync sdk=true
9678
10:07:59 Debug: Path /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files has type directory (ID: 0) pid=12345 mutator=validate:files_to_sync
9779
10:07:59 Info: completed execution pid=12345 exit_code=0
9880
10:07:59 Debug: no telemetry logs to upload pid=12345

acceptance/bundle/debuglog/script

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
$CLI bundle validate --debug 2> out.stderr.$DATABRICKS_CLI_DEPLOYMENT.txt
1+
$CLI bundle validate --debug 2> tmp.stderr.$DATABRICKS_CLI_DEPLOYMENT.txt
2+
# filter out lines that can change the order
3+
grep -v '^<' tmp.stderr.$DATABRICKS_CLI_DEPLOYMENT.txt | grep -v '^>' | grep -v '^Debug: GET /api/2.0/workspace/get-status' > out.stderr.$DATABRICKS_CLI_DEPLOYMENT.txt
4+
rm tmp.stderr.$DATABRICKS_CLI_DEPLOYMENT.txt

0 commit comments

Comments
 (0)