Skip to content

Commit 96d7b22

Browse files
authored
direct: Add empty_struct reason to skip (#4338)
## Why Some struct fields come back with an empty dict `{}`, e.g. email_notifications. Currently, we're relying on server_side_default to skip those, but we want to remove server_side_default in the future and replace with better & more targetted reasons.
1 parent f57cb72 commit 96d7b22

File tree

38 files changed

+131
-91
lines changed

38 files changed

+131
-91
lines changed

acceptance/bundle/artifacts/whl_dynamic/out.plan_update.direct.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"changes": {
153153
"email_notifications": {
154154
"action": "skip",
155-
"reason": "server_side_default",
155+
"reason": "empty_struct",
156156
"remote": {}
157157
},
158158
"environments[0].spec.dependencies[0]": {
@@ -180,7 +180,7 @@
180180
},
181181
"webhook_notifications": {
182182
"action": "skip",
183-
"reason": "server_side_default",
183+
"reason": "empty_struct",
184184
"remote": {}
185185
}
186186
}

acceptance/bundle/deploy/readplan/basic/out.plan_skip.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"changes": {
3232
"email_notifications": {
3333
"action": "skip",
34-
"reason": "server_side_default",
34+
"reason": "empty_struct",
3535
"remote": {}
3636
},
3737
"timeout_seconds": {
@@ -41,7 +41,7 @@
4141
},
4242
"webhook_notifications": {
4343
"action": "skip",
44-
"reason": "server_side_default",
44+
"reason": "empty_struct",
4545
"remote": {}
4646
}
4747
}

acceptance/bundle/migrate/basic/out.plan_update.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"changes": {
6464
"email_notifications": {
6565
"action": "skip",
66-
"reason": "server_side_default",
66+
"reason": "empty_struct",
6767
"remote": {}
6868
},
6969
"name": {
@@ -84,7 +84,7 @@
8484
},
8585
"webhook_notifications": {
8686
"action": "skip",
87-
"reason": "server_side_default",
87+
"reason": "empty_struct",
8888
"remote": {}
8989
}
9090
}

acceptance/bundle/migrate/default-python/out.plan_after_deploy.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
"changes": {
220220
"email_notifications": {
221221
"action": "skip",
222-
"reason": "server_side_default",
222+
"reason": "empty_struct",
223223
"remote": {}
224224
},
225225
"tasks[task_key='notebook_task'].libraries[0].whl": {
@@ -246,7 +246,7 @@
246246
},
247247
"webhook_notifications": {
248248
"action": "skip",
249-
"reason": "server_side_default",
249+
"reason": "empty_struct",
250250
"remote": {}
251251
}
252252
}

acceptance/bundle/migrate/default-python/out.plan_after_migration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
"changes": {
220220
"email_notifications": {
221221
"action": "skip",
222-
"reason": "server_side_default",
222+
"reason": "empty_struct",
223223
"remote": {}
224224
},
225225
"tasks[task_key='notebook_task'].libraries[0].whl": {
@@ -246,7 +246,7 @@
246246
},
247247
"webhook_notifications": {
248248
"action": "skip",
249-
"reason": "server_side_default",
249+
"reason": "empty_struct",
250250
"remote": {}
251251
}
252252
}

acceptance/bundle/migrate/default-python/output.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Building python_artifact...
7676
{
7777
"email_notifications": {
7878
"action": "skip",
79-
"reason": "server_side_default",
79+
"reason": "empty_struct",
8080
"remote": {}
8181
},
8282
"tasks[task_key='notebook_task'].libraries[0].whl": {
@@ -103,7 +103,7 @@ Building python_artifact...
103103
},
104104
"webhook_notifications": {
105105
"action": "skip",
106-
"reason": "server_side_default",
106+
"reason": "empty_struct",
107107
"remote": {}
108108
}
109109
}
@@ -150,7 +150,7 @@ Building python_artifact...
150150
{
151151
"email_notifications": {
152152
"action": "skip",
153-
"reason": "server_side_default",
153+
"reason": "empty_struct",
154154
"remote": {}
155155
},
156156
"tasks[task_key='notebook_task'].libraries[0].whl": {
@@ -177,7 +177,7 @@ Building python_artifact...
177177
},
178178
"webhook_notifications": {
179179
"action": "skip",
180-
"reason": "server_side_default",
180+
"reason": "empty_struct",
181181
"remote": {}
182182
}
183183
}

acceptance/bundle/resource_deps/id_chain/out.plan_skip.direct.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"changes": {
3333
"email_notifications": {
3434
"action": "skip",
35-
"reason": "server_side_default",
35+
"reason": "empty_struct",
3636
"remote": {}
3737
},
3838
"timeout_seconds": {
@@ -42,7 +42,7 @@
4242
},
4343
"webhook_notifications": {
4444
"action": "skip",
45-
"reason": "server_side_default",
45+
"reason": "empty_struct",
4646
"remote": {}
4747
}
4848
}
@@ -81,7 +81,7 @@
8181
"changes": {
8282
"email_notifications": {
8383
"action": "skip",
84-
"reason": "server_side_default",
84+
"reason": "empty_struct",
8585
"remote": {}
8686
},
8787
"timeout_seconds": {
@@ -91,7 +91,7 @@
9191
},
9292
"webhook_notifications": {
9393
"action": "skip",
94-
"reason": "server_side_default",
94+
"reason": "empty_struct",
9595
"remote": {}
9696
}
9797
}
@@ -130,7 +130,7 @@
130130
"changes": {
131131
"email_notifications": {
132132
"action": "skip",
133-
"reason": "server_side_default",
133+
"reason": "empty_struct",
134134
"remote": {}
135135
},
136136
"timeout_seconds": {
@@ -140,7 +140,7 @@
140140
},
141141
"webhook_notifications": {
142142
"action": "skip",
143-
"reason": "server_side_default",
143+
"reason": "empty_struct",
144144
"remote": {}
145145
}
146146
}
@@ -179,7 +179,7 @@
179179
"changes": {
180180
"email_notifications": {
181181
"action": "skip",
182-
"reason": "server_side_default",
182+
"reason": "empty_struct",
183183
"remote": {}
184184
},
185185
"timeout_seconds": {
@@ -189,7 +189,7 @@
189189
},
190190
"webhook_notifications": {
191191
"action": "skip",
192-
"reason": "server_side_default",
192+
"reason": "empty_struct",
193193
"remote": {}
194194
}
195195
}
@@ -228,7 +228,7 @@
228228
"changes": {
229229
"email_notifications": {
230230
"action": "skip",
231-
"reason": "server_side_default",
231+
"reason": "empty_struct",
232232
"remote": {}
233233
},
234234
"timeout_seconds": {
@@ -238,7 +238,7 @@
238238
},
239239
"webhook_notifications": {
240240
"action": "skip",
241-
"reason": "server_side_default",
241+
"reason": "empty_struct",
242242
"remote": {}
243243
}
244244
}

acceptance/bundle/resource_deps/id_chain/out.plan_update.direct.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
},
5555
"email_notifications": {
5656
"action": "skip",
57-
"reason": "server_side_default",
57+
"reason": "empty_struct",
5858
"remote": {}
5959
},
6060
"timeout_seconds": {
@@ -64,7 +64,7 @@
6464
},
6565
"webhook_notifications": {
6666
"action": "skip",
67-
"reason": "server_side_default",
67+
"reason": "empty_struct",
6868
"remote": {}
6969
}
7070
}
@@ -125,7 +125,7 @@
125125
},
126126
"email_notifications": {
127127
"action": "skip",
128-
"reason": "server_side_default",
128+
"reason": "empty_struct",
129129
"remote": {}
130130
},
131131
"timeout_seconds": {
@@ -135,7 +135,7 @@
135135
},
136136
"webhook_notifications": {
137137
"action": "skip",
138-
"reason": "server_side_default",
138+
"reason": "empty_struct",
139139
"remote": {}
140140
}
141141
}
@@ -196,7 +196,7 @@
196196
},
197197
"email_notifications": {
198198
"action": "skip",
199-
"reason": "server_side_default",
199+
"reason": "empty_struct",
200200
"remote": {}
201201
},
202202
"timeout_seconds": {
@@ -206,7 +206,7 @@
206206
},
207207
"webhook_notifications": {
208208
"action": "skip",
209-
"reason": "server_side_default",
209+
"reason": "empty_struct",
210210
"remote": {}
211211
}
212212
}
@@ -267,7 +267,7 @@
267267
},
268268
"email_notifications": {
269269
"action": "skip",
270-
"reason": "server_side_default",
270+
"reason": "empty_struct",
271271
"remote": {}
272272
},
273273
"timeout_seconds": {
@@ -277,7 +277,7 @@
277277
},
278278
"webhook_notifications": {
279279
"action": "skip",
280-
"reason": "server_side_default",
280+
"reason": "empty_struct",
281281
"remote": {}
282282
}
283283
}
@@ -338,7 +338,7 @@
338338
},
339339
"email_notifications": {
340340
"action": "skip",
341-
"reason": "server_side_default",
341+
"reason": "empty_struct",
342342
"remote": {}
343343
},
344344
"timeout_seconds": {
@@ -348,7 +348,7 @@
348348
},
349349
"webhook_notifications": {
350350
"action": "skip",
351-
"reason": "server_side_default",
351+
"reason": "empty_struct",
352352
"remote": {}
353353
}
354354
}

acceptance/bundle/resource_deps/job_id_delete_bar/out.plan_delete.direct.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"changes": {
8080
"email_notifications": {
8181
"action": "skip",
82-
"reason": "server_side_default",
82+
"reason": "empty_struct",
8383
"remote": {}
8484
},
8585
"tasks": {
@@ -108,7 +108,7 @@
108108
},
109109
"webhook_notifications": {
110110
"action": "skip",
111-
"reason": "server_side_default",
111+
"reason": "empty_struct",
112112
"remote": {}
113113
}
114114
}

acceptance/bundle/resource_deps/job_id_delete_foo/out.plan_delete.direct.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"changes": {
3232
"email_notifications": {
3333
"action": "skip",
34-
"reason": "server_side_default",
34+
"reason": "empty_struct",
3535
"remote": {}
3636
},
3737
"timeout_seconds": {
@@ -41,7 +41,7 @@
4141
},
4242
"webhook_notifications": {
4343
"action": "skip",
44-
"reason": "server_side_default",
44+
"reason": "empty_struct",
4545
"remote": {}
4646
}
4747
}

0 commit comments

Comments
 (0)