-
Notifications
You must be signed in to change notification settings - Fork 473
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
V1 Deprecation: Remove algod and kmd client affinity and consolidate APIs to use newest version #4641
V1 Deprecation: Remove algod and kmd client affinity and consolidate APIs to use newest version #4641
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4641 +/- ##
==========================================
+ Coverage 54.34% 54.39% +0.04%
==========================================
Files 402 402
Lines 51793 51786 -7
==========================================
+ Hits 28149 28168 +19
+ Misses 21276 21253 -23
+ Partials 2368 2365 -3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
I would approve except for the question of users of MakeRestClient - we need to make sure, for example, that we aren't making the loadgenerator slower.
func MakeRestClient(url url.URL, apiToken string) RestClient { | ||
return RestClient{ | ||
serverURL: url, | ||
apiToken: apiToken, | ||
versionAffinity: APIVersionV1, | ||
serverURL: url, | ||
apiToken: apiToken, |
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.
Do we understand why this was using APIVersionV1? It means, for example, that the loadgenerator cmd/loadgenerator/main.go
uses V1 today.
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.
I'm not sure.
- Scanning git history, I see 1750fb5#diff-c8e8e0d825d7542580daf188e1c5f6b4f079c888d10dfb2544a8a75b6419d0b4R72. When version affinity was introduced,
MakeRestClient
was locked to v1. - My unsubstantiated guess is: Using v1 simplified other ongoing work at the time and switching to v2 got lost in the shuffle.
- Additionally - For load generator algod API usage, I scanned endpoint implementations in v1 + v2 and spotted no meaningful differences. Of course, it'd be preferable for someone more familiar with load generator to vouch and/or run a test.
@cce @brianolson could you look into it to double check the |
|
I didn't do a performance stress test but
|
@brianolson Thank you for checking - visually, it doesn't look like the v2 API will cause any harm. Are reviewers OK with moving forward with this change then? |
Barring objections, I'll merge the PR near EOD. |
Summary
As part of sunsetting V1
algod
APIs, we wantgoal
to only use V2algod
APIs. This PR removes client affinity and consolidates all algod API calls to use the V2 version (mostly in test calls).kmd
affinity is also removed, but this does not affect any functionality since kmd only has one version.This does not change any
goal
behavior, as it fetched the V2 algod client by default: https://github.com/algorand/go-algorand/pull/4641/files#diff-75c865ad4f92ef3366534a2489ccd8aaf03e31a1b17027d64fe2216076d3c067L384Test Plan
CI Tests.