Repository navigation
Griddle: fail a grid cleanly when a listed band was not produced - #728
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #727.
summarize_datasettreated every dotted key it could not find as a pre-#672 layerset key and indexedds[var]without checking. A band listed on the grid but missing from the handler's output therefore raised a bareKeyError. 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 keyfuel_moisture.dead.1hrwhile griddle wrotefuel_moisture.1hr.Changes
summarize_datasetraisesProcessingErrorBAND_NOT_PRODUCEDwhen a band resolves to neither a variable nor a legacy<var>.<band>pair. Griddle records it as a terminal failure (200, no retry, WARNING).bandcoord holds the suffix. This also covers a legacy variable missing the requested band coord, which previously raisedKeyErrorfrom.sel.Tests
tests/test_summerize.pycovers the prod case (fuel_moisture.dead.1hragainstfuel_moisture.1hr), an undotted missing key, and a legacy variable without the requested band coord. All three fail onmainand pass here.tests/test_summerize.pyandtests/test_main.pypass: 42 tests.