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
Prevent session extension in SystemJobsStore #3625
Conversation
This has to be back-ported to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comment inline.
@@ -3,6 +3,7 @@ import Reflux from 'reflux'; | |||
import URLUtils from 'util/URLUtils'; | |||
import ApiRoutes from 'routing/ApiRoutes'; | |||
import fetch from 'logic/rest/FetchProvider'; | |||
import fetchPeriodically from 'logic/rest/FetchProvider'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not doing what it should. It uses the default export from FetchProvider
, which is the fetch
function, so there is no difference with the original code, except that the function is locally using another name.
In order to fix the issue we should use a named import here import { fetchPeriodically }...
to use the right function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need a small change there, but almost good to go 🙂
@@ -2,7 +2,7 @@ import Reflux from 'reflux'; | |||
|
|||
import URLUtils from 'util/URLUtils'; | |||
import ApiRoutes from 'routing/ApiRoutes'; | |||
import fetch from 'logic/rest/FetchProvider'; | |||
import {fetch, fetchPeriodically} from 'logic/rest/FetchProvider'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case this is also not the recommended way of importing both functions (it breaks the import/named
eslint rule). We should use this instead:
import fetch, { fetchPeriodically } from 'logic/rest/FetchProvider';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WTF JavaScript…?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
* Prevent session extension in SystemJobsStore Fixes #3587 * Use correct import statement https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import * Something with import… (cherry picked from commit 4ded9e7)
* Prevent session extension in SystemJobsStore Fixes #3587 * Use correct import statement https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import * Something with import… (cherry picked from commit 4ded9e7)
Fixes #3587