Skip to content
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

Merged
merged 3 commits into from Mar 17, 2017
Merged

Prevent session extension in SystemJobsStore #3625

merged 3 commits into from Mar 17, 2017

Conversation

joschi
Copy link
Contributor

@joschi joschi commented Mar 16, 2017

Fixes #3587

@joschi joschi added this to the 2.3.0 milestone Mar 16, 2017
@joschi
Copy link
Contributor Author

joschi commented Mar 16, 2017

This has to be back-ported to the 2.2 branch once it has been reviewed and merged.

Copy link
Contributor

@edmundoa edmundoa left a 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';
Copy link
Contributor

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.

Copy link
Contributor

@edmundoa edmundoa left a 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';
Copy link
Contributor

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';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WTF JavaScript…?!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@edmundoa edmundoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@edmundoa edmundoa merged commit 4ded9e7 into master Mar 17, 2017
@edmundoa edmundoa deleted the issue-3587 branch March 17, 2017 14:25
joschi added a commit that referenced this pull request Mar 17, 2017
* 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)
edmundoa pushed a commit that referenced this pull request Mar 17, 2017
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants