Fix reference cycle memory leak in _run_node#95
Conversation
Co-authored-by: shenald-dev <245350826+shenald-dev@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Hey @shenald-dev, heads up — this PR has merge conflicts with To fix: |
|
Thanks for the clear explanation and fix for the memory leak. Please resolve the merge conflicts with main as noted in the comments to proceed with merging. Reviewed — quality: high |
I have successfully merged the latest changes from |
Co-authored-by: shenald-dev <245350826+shenald-dev@users.noreply.github.com>
|
🔄 Re-evaluating based on recent changes: Nice fix for the reference cycle. Consider adding a brief note in the changelog about the memory leak resolution for future reference. Reviewed — quality: high |
Thank you for the review. I have added a brief note to |
Co-authored-by: shenald-dev <245350826+shenald-dev@users.noreply.github.com>
|
Hey @shenald-dev, heads up — this PR has merge conflicts with To fix: |
I have successfully merged the latest changes from |
Co-authored-by: shenald-dev <245350826+shenald-dev@users.noreply.github.com>
|
Well-explained fix for the memory leak. The refactoring is sound, tests pass, and merge conflicts are resolved. The change reduces coupling and eliminates the reference cycle as intended. Reviewed — quality: high |
Acknowledged. |
|
Hey @shenald-dev, heads up — this PR has merge conflicts with To fix: |
I have successfully merged the latest changes from |
Co-authored-by: shenald-dev <245350826+shenald-dev@users.noreply.github.com>
|
Well-explained fix for the reference cycle memory leak. The refactoring is clean, tests pass, and merge conflicts have been resolved. Consider adding a brief note in the changelog about the memory leak resolution (already done per CHANGELOG.md changes). Reviewed — quality: high |
Acknowledged. |
Refactored
WorkflowEngine._run_nodeto acceptdependency_tasks: tuple[asyncio.Task[Any], ...]instead of the mutabletasksdictionary._run_nodecoroutine and into the caller (execute)._run_nodenow strictly receives the specific sequence of awaitedTaskdependencies it needs.tasksdictionary into the async coroutine created a reference cycle memory leak (tasksdict ->Taskobject ->Coroutine->tasksdict). Extracting dependencies into a pre-resolved tuple breaks the cycle and cleanly decouples the async task runner from shared state.PR created automatically by Jules for task 12458985514428149869 started by @shenald-dev