Repository navigation
Remove parameter caching inside task class - #370
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #370 +/- ##
==========================================
+ Coverage 88.70% 88.89% +0.19%
==========================================
Files 43 43
Lines 1797 1792 -5
==========================================
- Hits 1594 1593 -1
+ Misses 203 199 -4 ☔ View full report in Codecov by Sentry. |
joeshannon
approved these changes
Feb 7, 2024
joeshannon
left a comment
Contributor
There was a problem hiding this comment.
This change look good, thanks!
My only note is that the new tests currently pass on main even without the associated changes to task/reworker.
This is because test_rest_api.py is only using the "internal" non-subprocess handler, and it highlights that we probably need to either convert it (relates partially to #360), or introduce some system tests.
Contributor
Author
|
Yeah I think #360 should go towards solving that, it's useful to have the test regardless |
ZohebShaikh
pushed a commit
that referenced
this pull request
May 7, 2024
Closes #369 The validated and processed parameters from a plan request were being cached inside the `Task` class because they were needed in two separate threads. Unfortunately, with the introduction of the subprocess (#343), pickling was causing issues with the cached object (see #369 for more details). This PR is the simplest solution: remove the cache and generate the parameters twice. It also adds regression tests for the bug case in #369
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.
Closes #369
The validated and processed parameters from a plan request were being cached inside the
Taskclass because they were needed in two separate threads. Unfortunately, with the introduction of the subprocess (#343), pickling was causing issues with the cached object (see #369 for more details).This PR is the simplest solution: remove the cache and generate the parameters twice. It also adds regression tests for the bug case in #369