Skip to content

test(regrid): Add robust OS-level memory leak tracking to Regrid pipeline - #561

Merged
j9sh264 merged 3 commits into
mainfrom
rg-memory-leak-tests
Sep 1, 2026
Merged

test(regrid): Add robust OS-level memory leak tracking to Regrid pipeline#561
j9sh264 merged 3 commits into
mainfrom
rg-memory-leak-tests

Conversation

@j9sh264

@j9sh264 j9sh264 commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Description

Previously, we identified a C-level memory leak in our code caused by the native fs.base_date() method when processing GRIB files, which was fixed in #550. This PR introduces automated tests to explicitly check for and catch any such instances of C-level memory leaks in the Regrid pipeline beforehand.

Testing Performed

  • Verified that reverting the fix from Fix Metview regrid memory leak #550 (using fs.base_date()) correctly triggers the new AssertionError due to ballooning memory.
  • Verified that using the patched get_memory_safe_base_date(fs) keeps memory growth under the 10.0 MB threshold across multiple test iterations.

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

@j9sh264
j9sh264 merged commit d3cff50 into main Sep 1, 2026
14 checks passed
@j9sh264
j9sh264 deleted the rg-memory-leak-tests branch September 1, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants