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

Allow query retry setting to be configurable #1677

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

louise-davies
Copy link
Member

Description

Adds a setting to all plugins that allows the sysadmin to set the react query query retry behaviour to whatever they want. I just let them set any number, including 0 to effectively disable retries even though setting false would have the same effect as keeping it as a number made typing easier.

This was requested by DLS as they have problems with queries timing out and they generally don't want to retry them, at the very least not 3 times like the current default. I opted away from limiting it to just problematic queries or from trying to figure out error messages indicating a query timeout and just made it a global config option.

Testing instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check Actions build
  • Review changes to test coverage

… or module mock implementation being outdated
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.01%. Comparing base (7ec33f3) to head (03de9cb).
Report is 20 commits behind head on develop.

Files with missing lines Patch % Lines
...kages/datagateway-download/src/downloadApiHooks.ts 94.11% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1677      +/-   ##
===========================================
+ Coverage    95.35%   96.01%   +0.65%     
===========================================
  Files          182      124      -58     
  Lines         7844     5122    -2722     
  Branches      2482     1603     -879     
===========================================
- Hits          7480     4918    -2562     
+ Misses         329      178     -151     
+ Partials        35       26       -9     
Flag Coverage Δ
common ?
dataview 97.32% <100.00%> (+<0.01%) ⬆️
download 96.03% <95.23%> (+0.04%) ⬆️
search 93.58% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@joelvdavies joelvdavies left a comment

Choose a reason for hiding this comment

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

Tested locally worked well for me, just one query.

- Remove TODO
- Refactor duplicate code into dg-common
Copy link
Contributor

@joelvdavies joelvdavies left a comment

Choose a reason for hiding this comment

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

LGTM

@louise-davies louise-davies merged commit 309c2a7 into develop Oct 2, 2024
10 checks passed
@louise-davies louise-davies deleted the configurable-retries branch October 2, 2024 08:34
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.

3 participants