[v7r1] Add listStatesForWeb endpoint to make Public State Manager faster#5159
Merged
Conversation
fstagni
reviewed
May 26, 2021
This was referenced May 26, 2021
fstagni
reviewed
May 27, 2021
|
|
||
| types_listStatesForWeb = [dict] | ||
|
|
||
| def export_listStatesForWeb(self, permission): |
Contributor
There was a problem hiding this comment.
As of now there's no integration test for the UserProfileClient -> UserProfileHandler -> UserProfileDB (it should be in tests/Integration/Framework). I would say that this is a good occasion for adding it.
| #asn1 | ||
| M2Crypto>=0.36 | ||
| autopep8==1.3.3 | ||
| cachetools<4 |
Contributor
There was a problem hiding this comment.
I am wondering if this file is still used or not. If not, maybe we can remove it from v7r2?
Member
Author
There was a problem hiding this comment.
We use it in LHCbDIRAC’s CI for Python 2 and I’m not particularly eager to break that while it’s stable. I hope it can be left as is until v8.
Contributor
There was a problem hiding this comment.
Ah right. Sure, let's leave it.
Co-authored-by: fstagni <federico.stagni@cern.ch>
atsareg
approved these changes
May 31, 2021
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.
This PR fixes an issue in the web app which cases the Public State Manager to almost never load for some users due to the response being too slow. There are two main optimisations:
latency * number of shared statesUserProfileDBto avoid making the same few read/timestamp updates being made hundreds/thousands of times.Note for 2. it uses cache tools which would need to be added in DIRACOS. Any objections?
I'll follow up with a WebApp PR which makes use of this.
BEGINRELEASENOTES
*Framework
NEW: Add UserProfileClient.listStatesForWeb endpoint to make the Public State Manager faster
ENDRELEASENOTES