-
-
Notifications
You must be signed in to change notification settings - Fork 232
Fix exec_js_process process caching #701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix exec_js_process process caching #701
Conversation
The existing logic doesn't properly cache processes, leading to a new process being created for every invocation of `exec_js_process` (eventually leading to an error due to too many processes with many calls to execjs). This commit fixes this logic and adds tests for this.
I updated arvados-cwl-runner with the latest cwltool with the jshint feature, and we are seeing some intermittent failures in our internal testing:
On a different test run:
Do you think these are caused by the bug fixed by this PR, or does it look like another problem? |
Also, your jshint unit tests appear to be failing with this fix. |
Codecov Report
@@ Coverage Diff @@
## master #701 +/- ##
=========================================
+ Coverage 62.46% 62.56% +0.1%
=========================================
Files 27 27
Lines 4422 4429 +7
Branches 1182 1184 +2
=========================================
+ Hits 2762 2771 +9
+ Misses 1366 1365 -1
+ Partials 294 293 -1
Continue to review full report at Codecov.
|
This could possibly be fixed by this PR, as the effects of this problem would be that a new process is generated for every JavaScript expression - which may result in the memory issues above. |
The existing logic doesn't properly cache processes, leading to a new process being created for every invocation of
exec_js_process
(eventually leading to an error due to too many processes with many calls to execjs). This PR fixes this logic and adds tests for this.