-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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: move parallelize package to non-internal file #105796
Fix: move parallelize package to non-internal file #105796
Conversation
@sanposhiho: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
/sig scheduling |
c517890
to
9dc0489
Compare
/assign @damemi |
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, sanposhiho The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hello team :)
What type of PR is this?
/kind bug
What this PR does / why we need it:
move parallelize package to non-internal folder(under /framework).
the interface
framework.Handle
hasParallelizer() parallelize.Parallelizer
method.https://github.com/kubernetes/kubernetes/blob/master/pkg/scheduler/framework/interface.go#L566
Of course, custom plugins also can use framework.Handle to call framework functions.
But, in custom plugins, we cannot import
parallelize.Parallelizer
, because it is placed under*/internal
dir.https://golang.org/doc/go1.4#internalpackages
kubernetes/pkg/scheduler/internal/parallelize/parallelism.go
Line 30 in 0ac956f
It makes it hard to create mocks for framework.Handle in other repo.
alternative way
create public interface in framework package for
parallelize.Parallelizer
and changeframework.Handle
to use it.like this:
Which issue(s) this PR fixes:
Fixes #105419
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: