Commit bafe106
authored
fix handling of null groupConfiguration (#1130)
* fix handling of null groupConfiguration
Fixes #1129 .
I added the "nullish" serde function and test emulating similar treatment for nullish boolean and map fields. i think the new deserialize_nullish function could supersede deserialize_nullish_boolean, deserialize_lambda_map, and possibly deserialize_lambda_dynamodb_item. but i left that out for a potential follow-up PR, to keep the blast radius small.
* consolidate nullish deserializers.
addressed review feedback for #1129 .
all of the implementations for the removed functions were identical, so they are exactly
equivalent to the generic deserialize_nullish. existing unit tests demonstrate
the equivalence. functions are private to the crate and safe to remove.
I added one assertion which demonstrates failing behavior for missing fields (which are *not*
covered by this deserializer). the behavior for that case is the same before and after
the change, it just wasn't tested.
also updated field documents and the helper function to explain the semantics.
* fix documentation and lint workflow errors.
* test cases for events with nullish behavior
Following CR feedback on #1130 .
The selected cases cover booleans, dynamodb items, maps, and the GroupConfiguration data structure, so we have at least one instance of each nullish use case.
I added a utility function for basic serde verification. I retrofitted it to existing tests for the data structures that got new cases, just so the code is consistent for them. There are a very large number of other similar cases that I left alone to keep the review reasonable.1 parent 6f305bb commit bafe106
31 files changed
Lines changed: 605 additions & 203 deletions
File tree
- lambda-events/src
- custom_serde
- event
- activemq
- alb
- apigw
- appsync
- autoscaling
- cloudwatch_events
- code_commit
- cognito
- connect
- dynamodb
- firehose
- iot_1_click
- kafka
- lambda_function_urls
- lex
- rabbitmq
- s3
- sns
- sqs
- vpc_lattice
- fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 70 | + | |
69 | 71 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 72 | | |
103 | 73 | | |
104 | 74 | | |
| |||
107 | 77 | | |
108 | 78 | | |
109 | 79 | | |
| 80 | + | |
110 | 81 | | |
| 82 | + | |
111 | 83 | | |
112 | 84 | | |
113 | 85 | | |
| |||
141 | 113 | | |
142 | 114 | | |
143 | 115 | | |
144 | | - | |
| 116 | + | |
145 | 117 | | |
146 | 118 | | |
147 | 119 | | |
| |||
160 | 132 | | |
161 | 133 | | |
162 | 134 | | |
163 | | - | |
| 135 | + | |
164 | 136 | | |
165 | | - | |
| 137 | + | |
166 | 138 | | |
167 | 139 | | |
168 | 140 | | |
| |||
176 | 148 | | |
177 | 149 | | |
178 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
179 | 177 | | |
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
183 | 181 | | |
184 | 182 | | |
185 | | - | |
| 183 | + | |
186 | 184 | | |
187 | 185 | | |
188 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
99 | 109 | | |
100 | 110 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
0 commit comments