-
Notifications
You must be signed in to change notification settings - Fork 94
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
refactor: restructured download logic (wip) #1432
base: main
Are you sure you want to change the base?
Conversation
a9afe39
to
f9f5547
Compare
f9f5547
to
323001f
Compare
f99a993
to
165811c
Compare
de38282
to
e2198df
Compare
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.
Better that it was.
e2198df
to
8e32d3c
Compare
2f2003e
to
f3796c0
Compare
Overall I find it easier to follow to than before, but the mixture of "normal" config APIs types where this downloading will download and unmarshal single objects and things like kua-web where downloading will get and create several entries (and resolves parent API) makes it still a bit hard to follow. Some explanatory comments on the functions would be nice. |
go func() { | ||
defer wg.Done() | ||
|
||
downloadedJsons, err := downloadAndUnmarshalConfig(client, api, v) | ||
dlData, err := download(client, api, v) |
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.
You didn't introduce this @warber, but: we capture the config to download v
in the loop and go routine, rather than passing it as a variable to the go func. This seems not to have caused issues so far - but couldn't it?
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.
Isn't that only a problem for go <1.22 ?
f3796c0
to
e4fbc04
Compare
@UnseenWizzard yes i know 😿 if you have any further ideas, feel free to give it a try :) |
7041663
to
2cb06ca
Compare
2cb06ca
to
9becd2f
Compare
29f3eba
to
954f51a
Compare
954f51a
to
414263c
Compare
414263c
to
185480d
Compare
This function is now split into two. Further, no special treatment to find matching key user action is needed as it is generally done via the CheckEqualFunc.
…t of downloadConfig function
185480d
to
caa02dd
Compare
Quality Gate passedIssues Measures |
What this PR does / Why we need it:
Refactored download logic a bit to avoid additional if statement to handle web key user actions.
Special notes for your reviewer:
Does this PR introduce a user-facing change?