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

chore(market)_: Increase market timouts to 20s #6386

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

friofry
Copy link
Contributor

@friofry friofry commented Mar 5, 2025

Main changes:

Added more diagnostic information:

  • circuit_breaker.go - log additional responseSize (if any), duration, timeout cancellation
  • Not market related: additional information in blockchain_health status
  • tests

Fixes status-im/status-mobile#22203

@status-im-auto
Copy link
Member

status-im-auto commented Mar 5, 2025

Jenkins Builds

Click to see older builds (112)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 1c115a1 #1 2025-03-05 10:00:12 ~3 min android 📦aar
✔️ 1c115a1 #1 2025-03-05 10:02:09 ~4 min ios 📦zip
✔️ 1c115a1 #1 2025-03-05 10:02:54 ~5 min linux 📦zip
✔️ 1c115a1 #1 2025-03-05 10:03:00 ~5 min macos 📦zip
✔️ 1c115a1 #1 2025-03-05 10:03:12 ~5 min macos 📦zip
✖️ 1c115a1 #1 2025-03-05 10:03:50 ~6 min tests 📄log
✔️ 1c115a1 #1 2025-03-05 10:04:36 ~7 min windows 📦zip
✔️ 1c115a1 #1 2025-03-05 10:14:43 ~17 min tests-rpc 📄log
✔️ 3921433 #2 2025-03-05 13:34:01 ~2 min ios 📦zip
✔️ 3921433 #2 2025-03-05 13:34:13 ~3 min android 📦aar
✔️ 3921433 #2 2025-03-05 13:35:19 ~4 min macos 📦zip
✔️ 3921433 #2 2025-03-05 13:35:28 ~4 min windows 📦zip
✖️ 3921433 #2 2025-03-05 13:35:28 ~4 min tests 📄log
✔️ 3921433 #2 2025-03-05 13:36:29 ~5 min macos 📦zip
✔️ 3921433 #2 2025-03-05 13:36:38 ~5 min linux 📦zip
✔️ 3921433 #2 2025-03-05 13:46:22 ~15 min tests-rpc 📄log
✔️ ffdf9a1 #4 2025-03-05 13:37:12 ~2 min ios 📦zip
✔️ ffdf9a1 #4 2025-03-05 13:38:17 ~3 min android 📦aar
✖️ ffdf9a1 #3 2025-03-05 13:39:03 ~3 min tests 📄log
✔️ ffdf9a1 #3 2025-03-05 13:39:51 ~4 min windows 📦zip
✔️ ffdf9a1 #3 2025-03-05 13:40:54 ~5 min macos 📦zip
✔️ ffdf9a1 #3 2025-03-05 13:41:56 ~5 min macos 📦zip
✔️ ffdf9a1 #3 2025-03-05 13:42:05 ~5 min linux 📦zip
✔️ ffdf9a1 #3 2025-03-05 14:02:56 ~16 min tests-rpc 📄log
✔️ b8c35ce #5 2025-03-05 14:21:09 ~3 min ios 📦zip
✔️ b8c35ce #5 2025-03-05 14:21:15 ~3 min android 📦aar
✔️ b8c35ce #4 2025-03-05 14:22:00 ~3 min macos 📦zip
✔️ b8c35ce #4 2025-03-05 14:22:43 ~4 min windows 📦zip
✖️ b8c35ce #4 2025-03-05 14:23:04 ~4 min tests 📄log
✔️ b8c35ce #4 2025-03-05 14:23:34 ~5 min macos 📦zip
✔️ b8c35ce #4 2025-03-05 14:23:41 ~5 min linux 📦zip
✔️ b8c35ce #4 2025-03-05 14:33:48 ~15 min tests-rpc 📄log
✖️ 6cced6a #5 2025-03-05 15:18:35 ~3 min tests 📄log
✔️ 6cced6a #6 2025-03-05 15:18:45 ~3 min android 📦aar
✔️ 6cced6a #6 2025-03-05 15:18:47 ~3 min ios 📦zip
✔️ 6cced6a #5 2025-03-05 15:19:23 ~3 min macos 📦zip
✔️ 6cced6a #5 2025-03-05 15:19:49 ~4 min windows 📦zip
✔️ 6cced6a #5 2025-03-05 15:21:26 ~5 min macos 📦zip
✔️ 6cced6a #5 2025-03-05 15:21:32 ~6 min linux 📦zip
✔️ 6cced6a #5 2025-03-05 15:30:15 ~14 min tests-rpc 📄log
✔️ b8e791b #7 2025-03-05 15:54:00 ~2 min ios 📦zip
✖️ b8e791b #6 2025-03-05 15:54:27 ~3 min tests 📄log
✔️ b8e791b #7 2025-03-05 15:54:35 ~3 min android 📦aar
✔️ b8e791b #6 2025-03-05 15:55:19 ~3 min macos 📦zip
✔️ b8e791b #6 2025-03-05 15:55:39 ~4 min windows 📦zip
✔️ b8e791b #6 2025-03-05 15:56:33 ~5 min macos 📦zip
✔️ b8e791b #6 2025-03-05 15:57:28 ~6 min linux 📦zip
✔️ b8e791b #6 2025-03-05 16:06:14 ~14 min tests-rpc 📄log
✔️ a6ac483 #8 2025-03-05 16:43:53 ~3 min ios 📦zip
✔️ a6ac483 #8 2025-03-05 16:44:08 ~3 min android 📦aar
✔️ a6ac483 #7 2025-03-05 16:45:17 ~4 min windows 📦zip
✖️ a6ac483 #7 2025-03-05 16:45:32 ~4 min tests 📄log
✔️ a6ac483 #7 2025-03-05 16:46:23 ~5 min macos 📦zip
✔️ a6ac483 #7 2025-03-05 16:46:40 ~5 min macos 📦zip
✔️ a6ac483 #7 2025-03-05 16:46:41 ~5 min linux 📦zip
✔️ a6ac483 #7 2025-03-05 16:56:05 ~15 min tests-rpc 📄log
✔️ 155a23c #9 2025-03-05 17:18:49 ~2 min ios 📦zip
✖️ 155a23c #8 2025-03-05 17:19:13 ~2 min tests 📄log
✔️ 155a23c #9 2025-03-05 17:19:29 ~3 min android 📦aar
✔️ 155a23c #8 2025-03-05 17:20:12 ~4 min macos 📦zip
✔️ 155a23c #8 2025-03-05 17:20:31 ~4 min windows 📦zip
✔️ 155a23c #8 2025-03-05 17:21:21 ~5 min macos 📦zip
✔️ 155a23c #8 2025-03-05 17:22:18 ~6 min linux 📦zip
✔️ 155a23c #8 2025-03-05 17:31:30 ~15 min tests-rpc 📄log
✔️ fc5ec3e #10 2025-03-05 21:19:42 ~2 min ios 📦zip
✔️ fc5ec3e #10 2025-03-05 21:19:54 ~2 min android 📦aar
✔️ fc5ec3e #9 2025-03-05 21:21:04 ~4 min macos 📦zip
✔️ fc5ec3e #9 2025-03-05 21:21:29 ~4 min windows 📦zip
✔️ fc5ec3e #9 2025-03-05 21:22:20 ~5 min macos 📦zip
✔️ fc5ec3e #9 2025-03-05 21:23:10 ~6 min linux 📦zip
✔️ fc5ec3e #9 2025-03-05 21:31:17 ~14 min tests-rpc 📄log
✖️ fc5ec3e #9 2025-03-05 21:49:06 ~32 min tests 📄log
✔️ 5380b2a #10 2025-03-06 10:07:28 ~4 min windows 📦zip
✔️ 5380b2a #10 2025-03-06 10:08:18 ~5 min macos 📦zip
✔️ be94d81 #11 2025-03-06 10:11:27 ~3 min windows 📦zip
✔️ be94d81 #11 2025-03-06 10:13:44 ~5 min macos 📦zip
✔️ be94d81 #12 2025-03-06 10:18:19 ~10 min android 📦aar
✔️ be94d81 #11 2025-03-06 10:20:33 ~12 min linux 📦zip
✔️ be94d81 #11 2025-03-06 10:27:43 ~16 min macos 📦zip
✔️ be94d81 #12 2025-03-06 10:30:31 ~6 min ios 📦zip
✔️ be94d81 #11 2025-03-06 10:33:50 ~25 min tests-rpc 📄log
✔️ be94d81 #11 2025-03-06 10:51:46 ~43 min tests 📄log
✔️ 38a1b8f #12 2025-03-06 10:57:50 ~4 min windows 📦zip
✔️ 38a1b8f #13 2025-03-06 10:58:18 ~4 min android 📦aar
✔️ 38a1b8f #12 2025-03-06 10:59:22 ~5 min macos 📦zip
✔️ 38a1b8f #12 2025-03-06 11:04:03 ~10 min linux 📦zip
✔️ 38a1b8f #12 2025-03-06 11:13:16 ~19 min tests-rpc 📄log
✖️ 38a1b8f #12 2025-03-06 11:28:25 ~34 min tests 📄log
✔️ 38a1b8f #13 2025-03-06 11:54:44 ~1 hr 1 min ios 📦zip
✔️ 38a1b8f #12 2025-03-06 11:57:52 ~1 hr 4 min macos 📦zip
✔️ 3962a7a #13 2025-03-06 11:06:28 ~4 min windows 📦zip
✔️ 3962a7a #13 2025-03-06 11:07:39 ~5 min macos 📦zip
✔️ 3962a7a #14 2025-03-06 11:13:14 ~11 min android 📦aar
✔️ 3962a7a #13 2025-03-06 11:22:08 ~17 min linux 📦zip
✔️ 3962a7a #13 2025-03-06 11:32:54 ~19 min tests-rpc 📄log
✖️ 3962a7a #13 2025-03-06 12:11:48 ~42 min tests 📄log
✔️ f2bc689 #14 2025-03-06 11:43:16 ~4 min windows 📦zip
✔️ f2bc689 #14 2025-03-06 11:44:21 ~5 min macos 📦zip
✔️ f2bc689 #15 2025-03-06 11:45:04 ~6 min android 📦aar
✔️ f2bc689 #14 2025-03-06 11:48:41 ~9 min linux 📦zip
✔️ f2bc689 #14 2025-03-06 12:00:02 ~21 min tests-rpc 📄log
✖️ f2bc689 #14 2025-03-06 12:35:39 ~23 min tests 📄log
✔️ f2bc689 #14 2025-03-06 12:46:20 ~51 min ios 📦zip
✔️ f2bc689 #13 2025-03-06 12:51:27 ~53 min macos 📦zip
✔️ b437a71 #15 2025-03-06 13:20:57 ~4 min windows 📦zip
✔️ b437a71 #15 2025-03-06 13:22:08 ~5 min macos 📦zip
✔️ b437a71 #16 2025-03-06 13:28:36 ~11 min android 📦aar
✔️ b437a71 #15 2025-03-06 13:30:57 ~14 min linux 📦zip
✔️ b437a71 #15 2025-03-06 13:40:46 ~23 min tests-rpc 📄log
✔️ b437a71 #15 2025-03-06 13:53:54 ~37 min ios 📦zip
✔️ b437a71 #14 2025-03-06 13:57:45 ~40 min macos 📦zip
✖️ b437a71 #15 2025-03-06 13:58:28 ~41 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e20db63 #16 2025-03-09 09:52:17 ~2 min ios 📦zip
✔️ e20db63 #17 2025-03-09 09:52:38 ~3 min android 📦aar
✖️ e20db63 #16 2025-03-09 09:52:54 ~3 min tests 📄log
✔️ e20db63 #16 2025-03-09 09:54:22 ~4 min windows 📦zip
✔️ e20db63 #16 2025-03-09 09:54:51 ~5 min macos 📦zip
✔️ e20db63 #16 2025-03-09 09:55:02 ~5 min linux 📦zip
✔️ e20db63 #15 2025-03-09 09:55:19 ~5 min macos 📦zip
✔️ e20db63 #16 2025-03-09 10:06:02 ~16 min tests-rpc 📄log
✔️ 55e79f9 #17 2025-03-09 10:01:45 ~2 min ios 📦zip
✖️ 55e79f9 #17 2025-03-09 10:02:03 ~2 min tests 📄log
✔️ 55e79f9 #18 2025-03-09 10:02:04 ~2 min android 📦aar
✔️ 55e79f9 #17 2025-03-09 10:03:34 ~4 min windows 📦zip
✔️ 55e79f9 #17 2025-03-09 10:04:22 ~5 min linux 📦zip
✔️ 55e79f9 #17 2025-03-09 10:04:24 ~5 min macos 📦zip
✔️ 55e79f9 #16 2025-03-09 10:05:18 ~6 min macos 📦zip
✔️ 55e79f9 #17 2025-03-09 10:23:08 ~16 min tests-rpc 📄log

@friofry friofry force-pushed the ab/issue-22203-increase-timeout branch 3 times, most recently from ccd3187 to ffdf9a1 Compare March 5, 2025 13:34
StartTime time.Time
Duration time.Duration
Err error
IsTimeoutErr bool
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm it looks weird to have this additional field when we've got the error itself, why not check the error for specific values wherever we need it?

Copy link
Contributor Author

@friofry friofry Mar 5, 2025

Choose a reason for hiding this comment

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

fixed
(initially I added this separately because it includes the hystrix error check). But on second thought, it's OK to make a function for this. Same for the duration

@friofry friofry force-pushed the ab/issue-22203-increase-timeout branch from ffdf9a1 to b8c35ce Compare March 5, 2025 14:17
@friofry friofry requested a review from dlipicar March 5, 2025 16:00
@friofry friofry force-pushed the ab/issue-22203-increase-timeout branch from b8e791b to a6ac483 Compare March 5, 2025 16:40
@friofry friofry changed the title Increase market timouts to 60s chore(market)_: Increase market timouts to 60s Mar 5, 2025
@friofry friofry force-pushed the ab/issue-22203-increase-timeout branch from 155a23c to fc5ec3e Compare March 5, 2025 21:16
@friofry friofry force-pushed the ab/issue-22203-increase-timeout branch from 5380b2a to be94d81 Compare March 6, 2025 10:03
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

Attention: Patch coverage is 88.99083% with 12 lines in your changes missing coverage. Please review.

Project coverage is 61.09%. Comparing base (0674d0d) to head (be94d81).

Files with missing lines Patch % Lines
services/wallet/thirdparty/http_client.go 69.56% 7 Missing ⚠️
services/wallet/api.go 0.00% 3 Missing ⚠️
rpc/client.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6386      +/-   ##
===========================================
+ Coverage    60.93%   61.09%   +0.15%     
===========================================
  Files          874      874              
  Lines       112386   112473      +87     
===========================================
+ Hits         68488    68711     +223     
+ Misses       35907    35766     -141     
- Partials      7991     7996       +5     
Flag Coverage Δ
functional 22.55% <82.56%> (+0.01%) ⬆️
unit 59.45% <88.99%> (+0.18%) ⬆️

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

Files with missing lines Coverage Δ
circuitbreaker/circuit_breaker.go 100.00% <100.00%> (+2.10%) ⬆️
healthmanager/aggregator/aggregator.go 100.00% <100.00%> (ø)
healthmanager/provider_errors/provider_errors.go 77.39% <100.00%> (+1.46%) ⬆️
...althmanager/provider_errors/rpc_provider_errors.go 82.85% <ø> (ø)
healthmanager/rpcstatus/provider_status.go 100.00% <100.00%> (ø)
rpc/chain/client.go 46.42% <100.00%> (+3.26%) ⬆️
services/wallet/market/market.go 76.75% <100.00%> (ø)
...vices/wallet/thirdparty/market/coingecko/client.go 63.28% <100.00%> (+1.80%) ⬆️
...s/wallet/thirdparty/market/cryptocompare/client.go 35.82% <100.00%> (+3.00%) ⬆️
rpc/client.go 63.76% <0.00%> (-0.63%) ⬇️
... and 2 more

... and 39 files with indirect coverage changes

@@ -45,9 +79,14 @@ func (c *HTTPClient) DoGetRequest(ctx context.Context, url string, params netUrl
}

var resp *http.Response
for i := 0; i < maxNumOfRequestRetries; i++ {
maxRetries := c.maxRetries
if maxRetries <= 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd expect 0 retries to mean 0 retries, can we use just negatives to set the default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

or maybe rename number of attempts?

@friofry friofry force-pushed the ab/issue-22203-increase-timeout branch from b437a71 to e20db63 Compare March 9, 2025 09:49
@friofry friofry changed the title chore(market)_: Increase market timouts to 60s chore(market)_: Increase market timouts to 20s Mar 9, 2025
* Can be tested with `FetchTokenDetails` on limited network (less than 1mbps)
* updated /rpc/network in codeowners
* chore(circuit-breaker)_: log request duration
* chore(rpc-health-manager)_: add API method to get rpc stats
* chore_: add total error count
* chore_: fix double slash in http urls

fixes status-im/status-mobile#22203
@friofry friofry force-pushed the ab/issue-22203-increase-timeout branch from e20db63 to 55e79f9 Compare March 9, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zero balances in wallet
4 participants