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

fix(node): don't retry 500 code responses #1891

Merged
merged 1 commit into from Sep 3, 2023
Merged

Conversation

davidyuk
Copy link
Member

In general node shouldn't return 500 code. And I don't know cases when it should be retried.

Also, it looks like our API gateway has a kind of protection of doing frequent requests that fail with 500 code: there is an exponentially growing delay in receiving a response.

For example, I was retrying https://testnet.aeternity.io/v3/dry-run

requested at 2023-08-27T16:23:08.129Z
responded at 2023-08-27T16:23:13.594Z with 500 code in 5 seconds

requested at 2023-08-27T16:23:13.652Z
responded at 2023-08-27T16:23:28.214Z with 500 code in 15 seconds

requested at 2023-08-27T16:23:28.444Z
responded at 2023-08-27T16:24:16.582Z with 500 code in 48 seconds

requested at 2023-08-27T16:24:17.096Z
responded at 2023-08-27T16:26:04.847Z with 500 code in 107 seconds

So, in this case, request retrying making the overall process extremely long, I'm proposing to disable it.

This PR is supported by the Æternity Crypto Foundation

@davidyuk davidyuk added the bug Something isn't working label Aug 27, 2023
@codecov
Copy link

codecov bot commented Aug 27, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.03% ⚠️

Comparison is base (eeba565) 81.40% compared to head (696e7db) 81.37%.
Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1891      +/-   ##
===========================================
- Coverage    81.40%   81.37%   -0.03%     
===========================================
  Files           94       94              
  Lines         3361     3361              
  Branches       671      671              
===========================================
- Hits          2736     2735       -1     
- Misses         300      303       +3     
+ Partials       325      323       -2     
Files Changed Coverage Δ
src/tx/builder/constants.ts 100.00% <ø> (ø)
src/tx/builder/field-types/ct-version.ts 70.00% <ø> (ø)
src/utils/autorest.ts 90.66% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

@davidyuk davidyuk merged commit 24b179c into develop Sep 3, 2023
4 of 5 checks passed
@davidyuk davidyuk deleted the feature/dont-retry-500 branch September 3, 2023 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant