Skip to content

Griddle: fail a grid cleanly when a listed band was not produced - #728

Merged
amarcozzi merged 1 commit into
mainfrom
727-summarize-missing-band
Oct 16, 2026
Merged

amarcozzi merged 1 commit into
mainfrom
727-summarize-missing-band

Conversation

@amarcozzi

Copy link
Copy Markdown
Contributor

Closes #727.

summarize_dataset treated every dotted key it could not find as a pre-#672 layerset key and indexed ds[var] without checking. A band listed on the grid but missing from the handler's output therefore raised a bare KeyError. Griddle returned a 500, Cloud Tasks retried (which can never succeed), and the grid was marked failed with no error code. Seen in prod on 2026-10-15: a grid listing the pre-#682 key fuel_moisture.dead.1hr while griddle wrote fuel_moisture.1hr.

Changes

  • summarize_dataset raises ProcessingError BAND_NOT_PRODUCED when a band resolves to neither a variable nor a legacy <var>.<band> pair. Griddle records it as a terminal failure (200, no retry, WARNING).
  • The legacy path is taken only when the variable exists and its band coord holds the suffix. This also covers a legacy variable missing the requested band coord, which previously raised KeyError from .sel.

Tests

tests/test_summerize.py covers the prod case (fuel_moisture.dead.1hr against fuel_moisture.1hr), an undotted missing key, and a legacy variable without the requested band coord. All three fail on main and pass here. tests/test_summerize.py and tests/test_main.py pass: 42 tests.

summarize_dataset fell back to the pre-#672 layerset lookup for any
dotted key and indexed ds[var] unchecked, so a band missing from the
handler's output raised a bare KeyError: 500, a Cloud Tasks retry that
could never succeed, and a failed grid with no error code. Raise
ProcessingError BAND_NOT_PRODUCED instead, and take the legacy path only
when the variable and its band coord exist.
@amarcozzi amarcozzi self-assigned this Oct 16, 2026
@amarcozzi
amarcozzi merged commit 279a360 into main Oct 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Griddle: band missing from the produced data crashes summarize with a KeyError and retries

1 participant