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 web proxy #1395

Merged
merged 8 commits into from
Jan 16, 2023
Merged

Fix web proxy #1395

merged 8 commits into from
Jan 16, 2023

Conversation

petreze
Copy link
Contributor

@petreze petreze commented Jan 13, 2023

Description:
This PR fixes the issue where the SDK does not check for any HTTP errors when trying to connect to some of the node proxies. Also there is a fix for a corner case if the random mechanism chooses the same node twice in a row and puts it inside the healthy nodes list

Related issue(s):

Fixes #1362 #1363

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

src/Executable.js Show resolved Hide resolved
src/Executable.js Show resolved Hide resolved
src/client/NativeClient.js Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 15, 2023

Codecov Report

Base: 83.42% // Head: 83.35% // Decreases project coverage by -0.07% ⚠️

Coverage data is based on head (693ed6b) compared to base (4e9af4e).
Patch coverage: 46.98% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1395      +/-   ##
===========================================
- Coverage    83.42%   83.35%   -0.08%     
===========================================
  Files          292      295       +3     
  Lines        72867    73047     +180     
===========================================
+ Hits         60790    60885      +95     
- Misses       12077    12162      +85     
Impacted Files Coverage Δ
src/channel/NativeChannel.js 0.00% <0.00%> (ø)
src/channel/WebChannel.js 0.00% <0.00%> (ø)
src/client/NativeClient.js 0.00% <0.00%> (ø)
src/client/WebClient.js 0.00% <0.00%> (ø)
src/constants/ClientConstants.js 0.00% <0.00%> (ø)
src/http/HttpError.js 70.45% <70.45%> (ø)
src/Executable.js 89.79% <76.47%> (-0.44%) ⬇️
src/http/HttpStatus.js 80.35% <80.35%> (ø)
src/client/ManagedNetwork.js 93.16% <100.00%> (+0.49%) ⬆️
src/client/Network.js 81.78% <100.00%> (+0.27%) ⬆️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Petar Tonev <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented Jan 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ochikov ochikov merged commit e68940b into develop Jan 16, 2023
@ochikov ochikov deleted the fix/web-proxy branch January 16, 2023 08:14
@petreze petreze linked an issue Jan 16, 2023 that may be closed by this pull request
monokaijs pushed a commit to monostarter/u2u-sdk-js that referenced this pull request Jul 5, 2023
* web proxy issues tracking

Signed-off-by: ochikov <[email protected]>

* added nodeAccountIds unlocking

Signed-off-by: Petar Tonev <[email protected]>

* unhealthy nodes now are handled correctly

Signed-off-by: Petar Tonev <[email protected]>

* added additional proxies urls and after task build refactoring

Signed-off-by: Petar Tonev <[email protected]>

* add urls to a new client constants file

Signed-off-by: Petar Tonev <[email protected]>

* fix integration tests

Signed-off-by: Petar Tonev <[email protected]>

* handle some corner cases

Signed-off-by: Petar Tonev <[email protected]>

Signed-off-by: ochikov <[email protected]>
Signed-off-by: Petar Tonev <[email protected]>
Co-authored-by: ochikov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants