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

The correct PluginConfig.Args is not passed to the corresponding PluginFactory in kube-scheduler when multiple PluginConfig items are defined #82483

Conversation

@everpeace
Copy link
Contributor

commented Sep 9, 2019

What type of PR is this?

/kind bug

What this PR does / why we need it:

/sig scheduling

PluginConfig.Args is not passed as expected if PluginConfig has multiple items. It is because the type of PluginConfig.Args is not pointer type.

Which issue(s) this PR fixes:

It fixes the above issue so that NewFramework correctly initialize PluginConfig.Args as expected.

Special notes for your reviewer:

the PR did not change api(KubeSchedulerConfiguration) at all but fixes inside of kube-scheduler (just allocating new variable to capture the correct PluginConfig.Args)

Does this PR introduce a user-facing change?:

fixed an issue that the correct PluginConfig.Args is not passed to the corresponding PluginFactory in kube-scheduler when multiple PluginConfig items are defined.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2019

Hi @everpeace. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@everpeace everpeace changed the title Fix scheduling frameworks's PluginConfig initialization PluginConfig.Args is not passed to the corresponding PluginFactory in kube-scheduler when multiple PluginConfig items are defined Sep 9, 2019
@k8s-ci-robot k8s-ci-robot requested review from Huang-Wei and wgliang Sep 9, 2019
@everpeace everpeace changed the title PluginConfig.Args is not passed to the corresponding PluginFactory in kube-scheduler when multiple PluginConfig items are defined The correct PluginConfig.Args is not passed to the corresponding PluginFactory in kube-scheduler when multiple PluginConfig items are defined Sep 9, 2019
Copy link
Member

left a comment

/ok-to-test
/priority important-soon

pkg/scheduler/framework/v1alpha1/framework_test.go Outdated Show resolved Hide resolved
Copy link
Member

left a comment

Generally looks good, just a few nits:

pkg/scheduler/framework/v1alpha1/framework_test.go Outdated Show resolved Hide resolved
@draveness

This comment has been minimized.

Copy link
Member

commented Sep 9, 2019

/assign @ahg-g @Huang-Wei

@everpeace everpeace force-pushed the everpeace:fix-scheduler-pluginconfig-initialization branch from c1ede35 to b3a82e3 Sep 9, 2019
@everpeace

This comment has been minimized.

Copy link
Contributor Author

commented Sep 9, 2019

@draveness Thanks for your quick review. I fixed my code as your comments.

Copy link
Member

left a comment

Thanks @everpeace, looks good, please squash the commits.

@everpeace everpeace force-pushed the everpeace:fix-scheduler-pluginconfig-initialization branch from b3a82e3 to f85fda2 Sep 10, 2019
@everpeace

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2019

Thanks. Squashed and pushed.

Copy link
Member

left a comment

/lgtm

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm label Sep 10, 2019
@everpeace everpeace referenced this pull request Sep 10, 2019
6 of 6 tasks complete
Copy link
Member

left a comment

Good catch!

pkg/scheduler/framework/v1alpha1/framework_test.go Outdated Show resolved Hide resolved
pkg/scheduler/framework/v1alpha1/framework_test.go Outdated Show resolved Hide resolved
Copy link
Member

left a comment

/hold

Calling DeepCopy() seems to be unnecessary.

pkg/scheduler/framework/v1alpha1/framework.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added do-not-merge/hold and removed lgtm labels Sep 10, 2019
@everpeace

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

I fixed as reviewers' comments. After being approved, I will squash my commits.
If it is ok to squash at this time, please tell me so 🙇

Copy link
Member

left a comment

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Sep 11, 2019
@ahg-g

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

/lgtm
/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, everpeace

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahg-g

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Please squash the comments.

@draveness

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

…rrect contents

because the type of PluginConfig.Args is not pointer.

It also fixed framework_test so that it can test PluginConfig initialization.
@everpeace everpeace force-pushed the everpeace:fix-scheduler-pluginconfig-initialization branch from 4a6cc26 to 439a682 Sep 11, 2019
@k8s-ci-robot k8s-ci-robot removed the lgtm label Sep 11, 2019
@everpeace

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

Squashed.

/hold cancel

Copy link
Member

left a comment

/lgtm

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm label Sep 11, 2019
@k8s-ci-robot k8s-ci-robot merged commit 3fd8962 into kubernetes:master Sep 12, 2019
25 checks passed
25 checks passed
cla/linuxfoundation everpeace authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-conformance-kind-ipv6 Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-alpha-features Skipped.
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.