Skip to content

Commit 5688dd1

Browse files
authored
acc: Fixed telemetry tests occasionally failing on Windows with incomplete output (#2830)
## Changes Making sure to write telemetry to separate file instead of output.txt because it is still open when we try to update it with update_file.py ## Why I suspect it might a combination of telemetry is being still written to output.txt but us using update_file.py to do the replacements there and thus overwriting the file because it seems only tests which used update_file.py fail like this
1 parent 9aff8c1 commit 5688dd1

File tree

6 files changed

+102
-102
lines changed

6 files changed

+102
-102
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"frontend_log_event_id": "[UUID]",
3+
"entry": {
4+
"databricks_cli_log": {
5+
"execution_context": {
6+
"cmd_exec_id": "[CMD-EXEC-ID]",
7+
"version": "[DEV_VERSION]",
8+
"command": "bundle_deploy",
9+
"operating_system": "[OS]",
10+
"execution_time_ms": SMALL_INT,
11+
"exit_code": 0
12+
},
13+
"bundle_deploy_event": {
14+
"bundle_uuid": "[UUID]",
15+
"deployment_id": "[UUID]",
16+
"resource_count": 0,
17+
"resource_job_count": 0,
18+
"resource_pipeline_count": 0,
19+
"resource_model_count": 0,
20+
"resource_experiment_count": 0,
21+
"resource_model_serving_endpoint_count": 0,
22+
"resource_registered_model_count": 0,
23+
"resource_quality_monitor_count": 0,
24+
"resource_schema_count": 0,
25+
"resource_volume_count": 0,
26+
"resource_cluster_count": 0,
27+
"resource_dashboard_count": 0,
28+
"resource_app_count": 0,
29+
"experimental": {
30+
"configuration_file_count": 4,
31+
"variable_count": 0,
32+
"complex_variable_count": 0,
33+
"lookup_variable_count": 0,
34+
"target_count": 1,
35+
"bool_values": [
36+
{
37+
"key": "python_wheel_wrapper_is_set",
38+
"value": false
39+
}
40+
],
41+
"bundle_mode": "TYPE_UNSPECIFIED",
42+
"workspace_artifact_path_type": "WORKSPACE_FILE_SYSTEM"
43+
}
44+
}
45+
}
46+
}
47+
}

acceptance/bundle/telemetry/deploy-config-file-count/output.txt

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,3 @@ Deploying resources...
55
Deployment complete!
66

77
>>> cat out.requests.txt
8-
{
9-
"frontend_log_event_id": "[UUID]",
10-
"entry": {
11-
"databricks_cli_log": {
12-
"execution_context": {
13-
"cmd_exec_id": "[CMD-EXEC-ID]",
14-
"version": "[DEV_VERSION]",
15-
"command": "bundle_deploy",
16-
"operating_system": "[OS]",
17-
"execution_time_ms": SMALL_INT,
18-
"exit_code": 0
19-
},
20-
"bundle_deploy_event": {
21-
"bundle_uuid": "[UUID]",
22-
"deployment_id": "[UUID]",
23-
"resource_count": 0,
24-
"resource_job_count": 0,
25-
"resource_pipeline_count": 0,
26-
"resource_model_count": 0,
27-
"resource_experiment_count": 0,
28-
"resource_model_serving_endpoint_count": 0,
29-
"resource_registered_model_count": 0,
30-
"resource_quality_monitor_count": 0,
31-
"resource_schema_count": 0,
32-
"resource_volume_count": 0,
33-
"resource_cluster_count": 0,
34-
"resource_dashboard_count": 0,
35-
"resource_app_count": 0,
36-
"experimental": {
37-
"configuration_file_count": 4,
38-
"variable_count": 0,
39-
"complex_variable_count": 0,
40-
"lookup_variable_count": 0,
41-
"target_count": 1,
42-
"bool_values": [
43-
{
44-
"key": "python_wheel_wrapper_is_set",
45-
"value": false
46-
}
47-
],
48-
"bundle_mode": "TYPE_UNSPECIFIED",
49-
"workspace_artifact_path_type": "WORKSPACE_FILE_SYSTEM"
50-
}
51-
}
52-
}
53-
}
54-
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
trace $CLI bundle deploy
22

3-
trace cat out.requests.txt | jq 'select(has("path") and .path == "/telemetry-ext") | .body.protoLogs[] | fromjson'
3+
trace cat out.requests.txt | jq 'select(has("path") and .path == "/telemetry-ext") | .body.protoLogs[] | fromjson' > out.telemetry.txt
44

55
cmd_exec_id=$(extract_command_exec_id.py)
66

7-
update_file.py output.txt $cmd_exec_id '[CMD-EXEC-ID]'
7+
update_file.py out.telemetry.txt $cmd_exec_id '[CMD-EXEC-ID]'
88

99
rm out.requests.txt
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"frontend_log_event_id": "[UUID]",
3+
"entry": {
4+
"databricks_cli_log": {
5+
"execution_context": {
6+
"cmd_exec_id": "[CMD-EXEC-ID]",
7+
"version": "[DEV_VERSION]",
8+
"command": "bundle_deploy",
9+
"operating_system": "[OS]",
10+
"execution_time_ms": SMALL_INT,
11+
"exit_code": 0
12+
},
13+
"bundle_deploy_event": {
14+
"bundle_uuid": "[ZERO_UUID]",
15+
"deployment_id": "[UUID]",
16+
"resource_count": 1,
17+
"resource_job_count": 1,
18+
"resource_pipeline_count": 0,
19+
"resource_model_count": 0,
20+
"resource_experiment_count": 0,
21+
"resource_model_serving_endpoint_count": 0,
22+
"resource_registered_model_count": 0,
23+
"resource_quality_monitor_count": 0,
24+
"resource_schema_count": 0,
25+
"resource_volume_count": 0,
26+
"resource_cluster_count": 0,
27+
"resource_dashboard_count": 0,
28+
"resource_app_count": 0,
29+
"resource_job_ids": [
30+
"1"
31+
],
32+
"experimental": {
33+
"configuration_file_count": 1,
34+
"variable_count": 0,
35+
"complex_variable_count": 0,
36+
"lookup_variable_count": 0,
37+
"target_count": 1,
38+
"bool_values": [
39+
{
40+
"key": "python_wheel_wrapper_is_set",
41+
"value": false
42+
}
43+
],
44+
"bundle_mode": "TYPE_UNSPECIFIED",
45+
"workspace_artifact_path_type": "WORKSPACE_FILE_SYSTEM"
46+
}
47+
}
48+
}
49+
}
50+
}

acceptance/bundle/telemetry/deploy-no-uuid/output.txt

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,3 @@ Updating deployment state...
66
Deployment complete!
77

88
>>> cat out.requests.txt
9-
{
10-
"frontend_log_event_id": "[UUID]",
11-
"entry": {
12-
"databricks_cli_log": {
13-
"execution_context": {
14-
"cmd_exec_id": "[CMD-EXEC-ID]",
15-
"version": "[DEV_VERSION]",
16-
"command": "bundle_deploy",
17-
"operating_system": "[OS]",
18-
"execution_time_ms": SMALL_INT,
19-
"exit_code": 0
20-
},
21-
"bundle_deploy_event": {
22-
"bundle_uuid": "[ZERO_UUID]",
23-
"deployment_id": "[UUID]",
24-
"resource_count": 1,
25-
"resource_job_count": 1,
26-
"resource_pipeline_count": 0,
27-
"resource_model_count": 0,
28-
"resource_experiment_count": 0,
29-
"resource_model_serving_endpoint_count": 0,
30-
"resource_registered_model_count": 0,
31-
"resource_quality_monitor_count": 0,
32-
"resource_schema_count": 0,
33-
"resource_volume_count": 0,
34-
"resource_cluster_count": 0,
35-
"resource_dashboard_count": 0,
36-
"resource_app_count": 0,
37-
"resource_job_ids": [
38-
"1"
39-
],
40-
"experimental": {
41-
"configuration_file_count": 1,
42-
"variable_count": 0,
43-
"complex_variable_count": 0,
44-
"lookup_variable_count": 0,
45-
"target_count": 1,
46-
"bool_values": [
47-
{
48-
"key": "python_wheel_wrapper_is_set",
49-
"value": false
50-
}
51-
],
52-
"bundle_mode": "TYPE_UNSPECIFIED",
53-
"workspace_artifact_path_type": "WORKSPACE_FILE_SYSTEM"
54-
}
55-
}
56-
}
57-
}
58-
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
trace $CLI bundle deploy
22

3-
trace cat out.requests.txt | jq 'select(has("path") and .path == "/telemetry-ext") | .body.protoLogs[] | fromjson'
3+
trace cat out.requests.txt | jq 'select(has("path") and .path == "/telemetry-ext") | .body.protoLogs[] | fromjson' > out.telemetry.txt
44

55
cmd_exec_id=$(extract_command_exec_id.py)
66

7-
update_file.py output.txt $cmd_exec_id '[CMD-EXEC-ID]'
8-
update_file.py output.txt "00000000-0000-0000-0000-000000000000" '[ZERO_UUID]'
7+
update_file.py out.telemetry.txt $cmd_exec_id '[CMD-EXEC-ID]'
8+
update_file.py out.telemetry.txt "00000000-0000-0000-0000-000000000000" '[ZERO_UUID]'
99

1010
rm out.requests.txt

0 commit comments

Comments
 (0)