Repository navigation
fix(#1365): no non-test code discards a json.Marshal or xml.Marshal error - #1392
Conversation
…rror 142 sites wrote x, _ := json.Marshal(v) (one xml.Marshal), most of them feeding state.Put, so a failed encode stored an empty record and answered 200 over state it never recorded. 120 now return the error wrapped with the plugin and operation. openSearchOK/openSearchStatusOK and EFS's mount-target counters now return their errors. The health, ready, emails and debug endpoints answer 500 on a failed encode, and SNS fan-out logs and skips a subscriber whose payload will not encode. Ten sites that provably cannot fail are recorded, each with its reason, in the new scripts/check-discarded-marshal.sh. make discarded-marshal-check fails on a new discard, keyed by file and enclosing function, and runs in CI. CI now also runs discarded-unmarshal-check (#1007), which until now ran only through make. Fixes #1365
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Merging with codecov/patch at 62%, deliberately. The 168 uncovered lines are almost all the new The behaviour that is reachable is covered and passes: the four nine-gate checks, |
142 sites wrote x, _ := json.Marshal(v) (one xml.Marshal), most of them
feeding state.Put, so a failed encode stored an empty record and answered 200
over state it never recorded. 120 now return the error wrapped with the
plugin and operation. openSearchOK/openSearchStatusOK and EFS's mount-target
counters now return their errors. The health, ready, emails and debug
endpoints answer 500 on a failed encode, and SNS fan-out logs and skips a
subscriber whose payload will not encode.
Ten sites that provably cannot fail are recorded, each with its reason, in
the new scripts/check-discarded-marshal.sh. make discarded-marshal-check fails
on a new discard, keyed by file and enclosing function, and runs in CI. CI now
also runs discarded-unmarshal-check (#1007), which until now ran only through
make.
Fixes #1365
Compatibility
Normal-path responses are byte-identical. Only failure paths that used to be silent change: a failed encode now answers a 500-class error instead of storing an empty record. EFS mount-target create and delete fail if the file system record can't be read or written. A CloudFormation YAML value with non-string keys resolves to its Go rendering instead of
"".