Reset _closeables in _init for flow reuse#597
Merged
gtopper merged 4 commits intomlrun:developmentfrom Dec 21, 2025
Merged
Conversation
76f96c4 to
321dfec
Compare
_closeables in _init for flow reuse
gtopper
reviewed
Dec 18, 2025
Collaborator
gtopper
left a comment
There was a problem hiding this comment.
Looks great. Would be good to add a regression unit test.
gtopper
reviewed
Dec 21, 2025
gtopper
reviewed
Dec 21, 2025
gtopper
reviewed
Dec 21, 2025
gtopper
approved these changes
Dec 21, 2025
Collaborator
gtopper
left a comment
There was a problem hiding this comment.
Cool. Please rebase / merge from dev before merge. This branch is missing
commit 0bfaa08e78570c2909275dae2740829a056f3aa8 (mlrun/development, mlrun/HEAD, development)
Author: davesh0812 <85231462+davesh0812@users.noreply.github.com>
Date: Sun Dec 21 12:33:03 2025 +0200
Minor fixes to the cyclic pr (#598)
added 4 commits
December 21, 2025 12:42
Tests verify that _closeables is properly reset when flows are reused: - test_flow_reuse_resets_closeables: Base Flow class resets to [] - test_aggregate_by_key_reuse_resets_closeables: AggregateByKey sets [table] - test_map_with_state_reuse_resets_closeables: MapWithState sets [state] for Table - test_map_with_state_no_closeables_without_close_method: No closeables for dict state - test_nosql_target_reuse_resets_closeables: NoSqlTarget sets [table]
…ments Updated tests to check source._closeables instead of downstream step's _closeables, as the bug manifests in upstream steps. Added comments clarifying which tests detect the ML-11518 regression (3 tests) vs baseline/edge case tests (2 tests). Verified: - 3 tests FAIL on commit 74fec1a (before fix) - correctly detecting bug - All 5 tests PASS on commit 321dfec (with fix) and current branch
- Replace dynamic closeables tracking with direct assertions - Add try/finally blocks to prevent test hangs on failure - Remove PR-specific docstring notes that don't apply post-merge - Move AggregateByKey test to test_aggregate_by_key.py
eb5f46c to
cbdf39a
Compare
gtopper
approved these changes
Dec 21, 2025
alxtkr77
added a commit
to alxtkr77/storey
that referenced
this pull request
Dec 21, 2025
* Reset _closeables in _init for flow reuse * Add unit tests for _closeables reset in _init for flow reuse Tests verify that _closeables is properly reset when flows are reused: - test_flow_reuse_resets_closeables: Base Flow class resets to [] - test_aggregate_by_key_reuse_resets_closeables: AggregateByKey sets [table] - test_map_with_state_reuse_resets_closeables: MapWithState sets [state] for Table - test_map_with_state_no_closeables_without_close_method: No closeables for dict state - test_nosql_target_reuse_resets_closeables: NoSqlTarget sets [table] * Fix unit tests to properly detect ML-11518 bug and add clarifying comments Updated tests to check source._closeables instead of downstream step's _closeables, as the bug manifests in upstream steps. Added comments clarifying which tests detect the ML-11518 regression (3 tests) vs baseline/edge case tests (2 tests). Verified: - 3 tests FAIL on commit 74fec1a (before fix) - correctly detecting bug - All 5 tests PASS on commit 321dfec (with fix) and current branch * Simplify ML-11518 regression tests based on code review - Replace dynamic closeables tracking with direct assertions - Add try/finally blocks to prevent test hangs on failure - Remove PR-specific docstring notes that don't apply post-merge - Move AggregateByKey test to test_aggregate_by_key.py --------- Co-authored-by: Alex Toker <alext@mckinsey.com>
gtopper
pushed a commit
that referenced
this pull request
Dec 21, 2025
* Reset _closeables in _init for flow reuse * Add unit tests for _closeables reset in _init for flow reuse Tests verify that _closeables is properly reset when flows are reused: - test_flow_reuse_resets_closeables: Base Flow class resets to [] - test_aggregate_by_key_reuse_resets_closeables: AggregateByKey sets [table] - test_map_with_state_reuse_resets_closeables: MapWithState sets [state] for Table - test_map_with_state_no_closeables_without_close_method: No closeables for dict state - test_nosql_target_reuse_resets_closeables: NoSqlTarget sets [table] * Fix unit tests to properly detect ML-11518 bug and add clarifying comments Updated tests to check source._closeables instead of downstream step's _closeables, as the bug manifests in upstream steps. Added comments clarifying which tests detect the ML-11518 regression (3 tests) vs baseline/edge case tests (2 tests). Verified: - 3 tests FAIL on commit 74fec1a (before fix) - correctly detecting bug - All 5 tests PASS on commit 321dfec (with fix) and current branch * Simplify ML-11518 regression tests based on code review - Replace dynamic closeables tracking with direct assertions - Add try/finally blocks to prevent test hangs on failure - Remove PR-specific docstring notes that don't apply post-merge - Move AggregateByKey test to test_aggregate_by_key.py --------- Co-authored-by: Alex Toker <alext@mckinsey.com>
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.
No description provided.