-
Notifications
You must be signed in to change notification settings - Fork 5
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 selection errors #1210 #1231
Conversation
…ems from the cart - also retry any mutations from TopCAT if we get 431 errors
Codecov Report
@@ Coverage Diff @@
## develop #1231 +/- ##
========================================
Coverage 97.48% 97.49%
========================================
Files 134 134
Lines 6805 6827 +22
Branches 2046 2055 +9
========================================
+ Hits 6634 6656 +22
Misses 155 155
Partials 16 16
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Note - the e2e tests will fail on CI until we release the relevant version of TopCAT to deploy on CI |
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.
Works great! Good use of retry
to give the request another go in the unlikely event it fails
Quick final comment: are we still using the |
I'm pretty sure it's exported and used in |
Ah yes I see, it's used in the |
- also rename addToCart to addOrRemoveFromCart
Just a couple of things I wanted to ask, since I've forgotten some of the context around this fix:
|
@sam-glendenning this is an intermittent error that TopCAT sometimes gives - the only way to fix it was to redeploy TopCAT but in the meantime, if you retried any request then it might go through within 3 tries. The same request could fail with 431 and then go through when you retry it. It is always 431 and we don't know why TopCAT was responding like that. It's only significant in that |
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.
Thanks for the clarification! Happy with this, works well after testing on Diamond preprod
Description
Requires a build of specific icatproject/topcat#483/ral-facilities/datagateway-download-api#12 branches.
This PR changes the multi-remove
useRemoveFromCart
method to use the same endpoint asuseAddToCart
with the remove parameter. I also added 431 retries to all TopCATuseMutation
uses (asuseMutation
doesn't automatically retry 3 times likeuseQuery
does). This should hopefully remove all errors.I didn't bother changing the remove from cart methods in
datagateway-download
as they either supply a single ID or an asterisk and so doesn't have the URL length problem.Testing instructions
Add a set up instructions describing how the reviewer should test the code
Agile board tracking
Closes #1210