Skip to content

Refactor empty filter handling in GribSplitterV2#549

Merged
j9sh264 merged 4 commits into
mainfrom
weather-sp-no-grib-message-match-filter
Jul 13, 2026
Merged

Refactor empty filter handling in GribSplitterV2#549
j9sh264 merged 4 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.

@j9sh264 j9sh264 requested a review from mahrsee1997 July 2, 2026 04:31
@j9sh264 j9sh264 added enhancement New feature or request weather-sp labels Jul 2, 2026

@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!

Just bump the version.txt. Thanks!

@j9sh264 j9sh264 force-pushed the weather-sp-no-grib-message-match-filter branch from 973c59f to c76524e Compare July 10, 2026 10:59
@j9sh264 j9sh264 merged commit ef710fe into main Jul 13, 2026
14 checks passed
@j9sh264 j9sh264 deleted the weather-sp-no-grib-message-match-filter branch July 13, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request weather-sp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants