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

Take the context as the first argument of Schedule #82119

Merged

Conversation

wgliang
Copy link
Contributor

@wgliang wgliang commented Aug 29, 2019

What type of PR is this?

/kind cleanup

What this PR does / why we need it:
According to #81876 (comment)

FYI:https://golang.org/pkg/context/
The Context should be the first parameter

So we will take the context as the first argument of Schedule()

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Take the context as the first argument of Schedule.

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


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 29, 2019
@wgliang
Copy link
Contributor Author

wgliang commented Aug 29, 2019

/sig scheduling

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 29, 2019
@wgliang wgliang force-pushed the fixbug/fix-scheudle-function-context branch from bb0f07d to df579d0 Compare August 29, 2019 09:37
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 29, 2019
@wgliang wgliang force-pushed the fixbug/fix-scheudle-function-context branch from df579d0 to 008f4e2 Compare August 29, 2019 09:48
@Huang-Wei
Copy link
Member

Technically yes, although this is not the real context.Context.

Prefer to incorporate this changes in #82072 where introduced the real context.Context.

cc/ @draveness

@wgliang
Copy link
Contributor Author

wgliang commented Aug 30, 2019

Technically yes, although this is not the real context.Context.

Prefer to incorporate this changes in #82072 where introduced the real context.Context.

cc/ @draveness

Agree with that. It looks better.

@wgliang
Copy link
Contributor Author

wgliang commented Sep 12, 2019

/cc @ahg-g
Any suggestions? Does this PR need to continue?

@draveness
Copy link
Contributor

Any suggestions? Does this PR need to continue?

I believe this was superseded by #82072 :)

@Huang-Wei
Copy link
Member

@wgliang Would you mind closing this in favor of #82072?

@ahg-g
Copy link
Member

ahg-g commented Sep 12, 2019

@wgliang Would you mind closing this in favor of #82072?

I think it is fine to have this one merged while we debate the other issue, we need to do this in all cases, whether #82072 ends up being merged or not.

@Huang-Wei
Copy link
Member

Huang-Wei commented Sep 12, 2019

Per offline discussion with @ahg-g, it seems we have another PR slipped in and made "PluginContext" as the first parameter. To make the API parameters consistent (Preempt() and Schedule()), I'm OK with merging this in.

@ahg-g
Copy link
Member

ahg-g commented Sep 12, 2019

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Sep 12, 2019
@k8s-ci-robot k8s-ci-robot merged commit 82f5531 into kubernetes:master Sep 12, 2019
@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
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants