Skip to content

Commit f171f8f

Browse files
authored
Remove empty permissions from json output (#3715)
## Changes When processing permissions, do not convert nils to empty slice in dyn value. ## Why Without this '"permissions: []"' always shows up in JSON output. When permissions are not present in the config, this is confusing. In addition, Permissions fields are marked as "omitempty" so even if they are present, they should be cleaned up. Related: #2756 (review) ## Tests Existing tests.
1 parent acead37 commit f171f8f

File tree

49 files changed

+67
-173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+67
-173
lines changed

acceptance/bundle/bundle_tag/id/output.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Validation OK!
2121
"id": "123",
2222
"max_concurrent_runs": 1,
2323
"name": "Untitled",
24-
"permissions": [],
2524
"queue": {
2625
"enabled": true
2726
}

acceptance/bundle/bundle_tag/url/output.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Validation OK!
2020
"format": "MULTI_TASK",
2121
"max_concurrent_runs": 1,
2222
"name": "Untitled",
23-
"permissions": [],
2423
"queue": {
2524
"enabled": true
2625
},

acceptance/bundle/bundle_tag/url_ref/output.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Validation OK!
2020
"format": "MULTI_TASK",
2121
"max_concurrent_runs": 1,
2222
"name": "Untitled",
23-
"permissions": [],
2423
"queue": {
2524
"enabled": true
2625
},
@@ -35,7 +34,6 @@ Validation OK!
3534
"format": "MULTI_TASK",
3635
"max_concurrent_runs": 1,
3736
"name": "Untitled",
38-
"permissions": [],
3937
"queue": {
4038
"enabled": true
4139
},

acceptance/bundle/deploy/dashboard/detect-change/output.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"file_path": "dashboard.lvdash.json",
88
"modified_status": "created",
99
"parent_path": "/Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/resources",
10-
"permissions": [],
1110
"warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]"
1211
}
1312

@@ -34,7 +33,6 @@ Deployment complete!
3433
"file_path": "dashboard.lvdash.json",
3534
"id": "[ALPHANUMID]",
3635
"parent_path": "/Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/resources",
37-
"permissions": [],
3836
"url": "[DATABRICKS_URL]/dashboardsv3/[ALPHANUMID]/published",
3937
"warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]"
4038
}

acceptance/bundle/deploy/sql_warehouse/output.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Validation OK!
1818
"max_num_clusters": 1,
1919
"min_num_clusters": 1,
2020
"name": "sql_warehouse_name",
21-
"permissions": [],
2221
"spot_instance_policy": "COST_OPTIMIZED"
2322
}
2423
}

acceptance/bundle/includes/yml_outside_root/output.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Validation OK!
1818
"format": "MULTI_TASK",
1919
"max_concurrent_runs": 1,
2020
"name": "include_outside_root",
21-
"permissions": [],
2221
"queue": {
2322
"enabled": true
2423
},

acceptance/bundle/override/job_cluster/output.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
],
2121
"max_concurrent_runs": 1,
2222
"name": "job",
23-
"permissions": [],
2423
"queue": {
2524
"enabled": true
2625
}
@@ -48,7 +47,6 @@
4847
],
4948
"max_concurrent_runs": 1,
5049
"name": "job",
51-
"permissions": [],
5250
"queue": {
5351
"enabled": true
5452
}

acceptance/bundle/override/job_cluster_var/output.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
],
2121
"max_concurrent_runs": 1,
2222
"name": "job",
23-
"permissions": [],
2423
"queue": {
2524
"enabled": true
2625
}
@@ -57,7 +56,6 @@ Validation OK!
5756
],
5857
"max_concurrent_runs": 1,
5958
"name": "job",
60-
"permissions": [],
6159
"queue": {
6260
"enabled": true
6361
}

acceptance/bundle/override/job_tasks/output.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"max_concurrent_runs": 1,
33
"name": "job",
4-
"permissions": [],
54
"queue": {
65
"enabled": true
76
},
@@ -37,7 +36,6 @@ Exit code: 1
3736
{
3837
"max_concurrent_runs": 1,
3938
"name": "job",
40-
"permissions": [],
4139
"queue": {
4240
"enabled": true
4341
},

acceptance/bundle/override/pipeline_cluster/output.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/development/state/metadata.json"
1919
},
2020
"edition": "ADVANCED",
21-
"name": "job",
22-
"permissions": []
21+
"name": "job"
2322
}
2423
}
2524

@@ -42,7 +41,6 @@
4241
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/staging/state/metadata.json"
4342
},
4443
"edition": "ADVANCED",
45-
"name": "job",
46-
"permissions": []
44+
"name": "job"
4745
}
4846
}

0 commit comments

Comments
 (0)