Skip to content

Refactor empty filter handling in GribSplitterV2#549

Open
j9sh264 wants to merge 2 commits into
mainfrom
weather-sp-no-grib-message-match-filter
Open

Refactor empty filter handling in GribSplitterV2#549
j9sh264 wants to merge 2 commits into
mainfrom
weather-sp-no-grib-message-match-filter

Conversation

@j9sh264

@j9sh264 j9sh264 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

fix(splitter): gracefully handle empty GRIB filter matches

When applying a --where filter expression in GribSplitterV2, files containing
zero matching messages previously caused a crash or required a broad try/except
block in the pipeline that swallowed unexpected errors.

This change:

  • Detects when grib_get returns an empty string (no filter matches).
  • Gracefully logs a warning and returns early instead of crashing.
  • Increments a new skipped_empty_filter Beam metric for observability.

@j9sh264 j9sh264 self-assigned this Jun 17, 2026
@mahrsee1997 mahrsee1997 marked this pull request as ready for review June 23, 2026 14:31

@mahrsee1997 mahrsee1997 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Please bump version of setup.py and Version.txt.

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.

2 participants