Commit 898ecd8
authored
IMF PortWatch ran a backend reserved-keyword rename on 2026-04-29
(date → date_, year → year_, month → month_, day → day_). Field aliases
stayed as the original names, but ArcGIS WHERE / outFields / orderByFields
/ outStatistics require the actual field name — alias ≠ queryable name.
Every per-country windowed query started failing with HTTP 400 "Cannot
perform query. Invalid query parameters." (00:04 UTC and 02:54 UTC runs
both 100% rejected, log lines 416-419 and 356-360 of the bundle output).
Diagnostic: error.details[] contains "'Invalid field: date' parameter is
invalid" — top-level message is generic, details has the real signal.
Confirmed via FeatureServer/0?f=json schema introspection.
Fix: rename all six in-code references (outFields, orderByFields, two
WHERE clauses, the per-row null-check on a.date_, and onStatisticField).
The `timestamp 'YYYY-MM-DD HH:MM:SS'` SQL literal still works on the new
esriFieldTypeDateOnly column, so the literal format is unchanged.
Hardening: add a first-batch circuit-breaker. When ≥80% of batch 1 is
rejected with the same "Invalid query parameters" error class, assume
global upstream regression and skip the remaining 14 batches — the
catch-path's extendExistingTtl preserves prior payloads. Cuts failure
cost from ~30s to ~2s and keeps Sentry signal-to-noise sane on the
next rename / policy change. The existing single-retry stays in place
for the original 3-of-N flake case (BRA/IDN/NGA, 2026-04-20).
Verified end-to-end against live ArcGIS:
- patched WHERE returns features w/ attributes.date_ = "2026-03-30"
- patched preflight returns max_date = "2026-04-24"
Test updates: two static-source assertions moved to date_; per-row
test-helper using r.date stays (it's an abstract aggregation test
unrelated to the ArcGIS shape).
1 parent a750cfb commit 898ecd8
2 files changed
Lines changed: 48 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
156 | 163 | | |
157 | 164 | | |
158 | 165 | | |
159 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
160 | 170 | | |
161 | | - | |
| 171 | + | |
162 | 172 | | |
163 | 173 | | |
164 | 174 | | |
| |||
168 | 178 | | |
169 | 179 | | |
170 | 180 | | |
171 | | - | |
| 181 | + | |
172 | 182 | | |
173 | 183 | | |
174 | 184 | | |
| |||
214 | 224 | | |
215 | 225 | | |
216 | 226 | | |
217 | | - | |
218 | | - | |
| 227 | + | |
| 228 | + | |
219 | 229 | | |
220 | 230 | | |
221 | 231 | | |
| |||
238 | 248 | | |
239 | 249 | | |
240 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
241 | 254 | | |
242 | 255 | | |
243 | 256 | | |
244 | 257 | | |
245 | | - | |
| 258 | + | |
246 | 259 | | |
247 | 260 | | |
248 | 261 | | |
249 | 262 | | |
250 | 263 | | |
251 | 264 | | |
252 | | - | |
| 265 | + | |
253 | 266 | | |
254 | 267 | | |
255 | 268 | | |
| |||
266 | 279 | | |
267 | 280 | | |
268 | 281 | | |
269 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
270 | 286 | | |
271 | 287 | | |
272 | 288 | | |
| |||
521 | 537 | | |
522 | 538 | | |
523 | 539 | | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
524 | 559 | | |
525 | 560 | | |
526 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | | - | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | | - | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
0 commit comments