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

Allow framework plugins to be closed #122498

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Conversation

Gekko0114
Copy link
Member

@Gekko0114 Gekko0114 commented Dec 27, 2023

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

This PR allows framework plugins to be closed when they satisfy a type assertion on io.Closer.
For example, wasm plugins internally use mapped memory and it would be good to cleanly unmap them.
https://github.com/kubernetes-sigs/kube-scheduler-wasm-extension/blob/73a62c8e1abe3e0efe6c523610b3cc270cdcd1f0/scheduler/plugin/plugin.go#L443

Which issue(s) this PR fixes:

Fixes #118147

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Allow scheduling framework plugins that implement io.Closer to be gracefully closed.

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


@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 27, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Dec 27, 2023
@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 27, 2023
@Gekko0114 Gekko0114 marked this pull request as ready for review December 28, 2023 05:26
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 28, 2023
@k8s-ci-robot k8s-ci-robot requested a review from damemi December 28, 2023 05:26
@Gekko0114
Copy link
Member Author

/assign @sanposhiho

Could you review it? And also it would be great if you could triage the issue attached to this PR.

@sanposhiho
Copy link
Member

/remove api-change

@sanposhiho
Copy link
Member

/remove-kind api-change

@k8s-ci-robot k8s-ci-robot removed the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Dec 28, 2023
Copy link
Member

@sanposhiho sanposhiho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only nits

pkg/scheduler/framework/runtime/framework.go Outdated Show resolved Hide resolved
pkg/scheduler/framework/runtime/framework.go Outdated Show resolved Hide resolved
pkg/scheduler/framework/runtime/framework.go Outdated Show resolved Hide resolved
pkg/scheduler/framework/runtime/framework_test.go Outdated Show resolved Hide resolved
pkg/scheduler/framework/runtime/framework_test.go Outdated Show resolved Hide resolved
pkg/scheduler/framework/runtime/framework_test.go Outdated Show resolved Hide resolved
pkg/scheduler/profile/profile.go Outdated Show resolved Hide resolved
pkg/scheduler/profile/profile.go Outdated Show resolved Hide resolved
@sanposhiho
Copy link
Member

/release-note-edit

Allow scheduling framework plugins to be closed via io.Closer.

@Gekko0114
Copy link
Member Author

@sanposhiho,
Thanks! Fixed all.

@Gekko0114
Copy link
Member Author

/retest

@alculquicondor
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, Gekko0114

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 3, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 3, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 4, 2024
@Gekko0114
Copy link
Member Author

@alculquicondor , @Huang-Wei ,
I changed code based on your comments. Could you review it again?

@Huang-Wei
Copy link
Member

Huang-Wei commented Jan 4, 2024

I changed code based on your comments. Could you review it again?

LGTM. Thanks

/lgtm

(leaving unhold to Aldo)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 4, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 98333eda2652a11d2e766dc926e5c1bd293ea769

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 6, 2024
@k8s-ci-robot k8s-ci-robot requested a review from Huang-Wei January 6, 2024 00:37
@Gekko0114
Copy link
Member Author

/retest

@Gekko0114
Copy link
Member Author

@alculquicondor @sanposhiho @Huang-Wei

I fixed it, could you review it again?

@sanposhiho
Copy link
Member

/lgtm

Leave unhold for others.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 6, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 60761bcdb39fb477d9dbb5512f66b08cae224a8d

Copy link
Member

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 8, 2024
@k8s-ci-robot k8s-ci-robot merged commit 5b979a3 into kubernetes:master Jan 8, 2024
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Jan 8, 2024
@Gekko0114 Gekko0114 deleted the close branch January 9, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow framework plugins to be closed
6 participants