Commit b7d0d04
Update evaluation reason for empty waterfall to DEFAULT instead of ERROR/GENERAL per REASON.9 (#11193)
Fix REASON-9: empty allocations waterfall returns DEFAULT not GENERAL
fix(ffe): add null-allocations guard; fix empty-allocs test expectation
- DDEvaluator: add explicit null check for flag.allocations before the
iteration loop. A null list throws NPE which gets swallowed as GENERAL;
returning GENERAL explicitly with a clear message is safer and testable.
- DDEvaluatorTest.testNoAllocations: the empty-allocation case already
falls through the for-loop to the DEFAULT return; the test was asserting
ERROR/GENERAL which contradicts the fix. Update to assert DEFAULT with no
error code.
Update error message for null allocations in feature flag
Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>1 parent 1602f06 commit b7d0d04
2 files changed
Lines changed: 5 additions & 4 deletions
File tree
- products/feature-flagging/feature-flagging-api/src
- main/java/datadog/trace/api/openfeature
- test/java/datadog/trace/api/openfeature
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
| 104 | + | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
178 | | - | |
| 178 | + | |
| 179 | + | |
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| |||
0 commit comments