-
Notifications
You must be signed in to change notification settings - Fork 71
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
Simplify code around reading from registries #68
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: justinsb The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c63db1a
to
b3fa7ba
Compare
So this is an experiment to see what the code looks like if it we do it in the more straightforward way (without the threadpool helpers). I personally think the code is much easier to follow, but I wanted to raise it as a topic for discussion @listx . I think we could re-add concurrent requests within the function and retain most of the simplicity, I think, if we thought it critical. |
Much slower as no longer parallel execution, but more direct/simpler.
b3fa7ba
to
55dab5c
Compare
This is a non-trivial undertaking --- but I'm not sure why you are trying to change code that is known to work. And as you noted yourself, this only worsens the performance. "If it ain't broken, don't fix it", right? So from those 2 standpoints, I would give this PR 2 strikes. I would give it a 3rd strike because this breaks the established worker pool pattern we use in other functions that go over the network, such as Are there other reasons for this effort other than what you've already stated? |
Putting in notes here for the record per our discussion offline @justinsb: The current design, while somewhat unusual compared to other Go code with the workerpool pattern, is solid. It was designed with 2 things in mind: (1) concurrency and (2) testability (with fakes). Still, it's worth exploring options to make it easier to understand. Let's examine ways to simplify the codebase but still keep these 2 qualities intact. |
/assign @listx |
@justinsb: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@justinsb: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Much slower as no longer parallel execution, but more direct/simpler.