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

Implementation of a function that returns the wait state of the scheduler #109478

Merged
merged 1 commit into from May 4, 2022

Conversation

gx14ac
Copy link
Contributor

@gx14ac gx14ac commented Apr 14, 2022

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

I thought it would be useful to have this function when I am building my own Kubernetes scheduler, so I sent a PR.
Just as Success has an IsSuccess function, it would be nice to have an IsWait for Wait.
I am new to Kubernetes, so maybe this is a pointless change.
But I sent this PR in the hope that there is even a small chance of keeping the code clean. If it's useless, feel free to delete it!
Any reviews would be greatly appreciated!

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


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


@k8s-ci-robot k8s-ci-robot added 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. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 14, 2022
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 14, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: shintard / name: Shinta (9480a51ee27737327e705542aefc9e76f165048f, d1255c9c50cc10a880a3925ad2d126fddd8bb0ce, 7d08a7d3b720fc9b7d9b10cac012e738e779f96d)

@k8s-ci-robot
Copy link
Contributor

@shintard: 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-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Apr 14, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @shintard!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @shintard. 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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 14, 2022
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Apr 14, 2022
@Huang-Wei
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 14, 2022
@gx14ac
Copy link
Contributor Author

gx14ac commented Apr 15, 2022

/retest

@gx14ac
Copy link
Contributor Author

gx14ac commented Apr 15, 2022

The test seems to be failing, is there anything else I need to add?
For example, adding to the TestStatus and TestStatusCode test functions in pkg/scheduler/framework/interface_test.go.

@kerthcet
Copy link
Member

/retest

@kerthcet
Copy link
Member

The test seems to be failing, is there anything else I need to add? For example, adding to the TestStatus and TestStatusCode test functions in pkg/scheduler/framework/interface_test.go.

It's better to add tests, you can rename TestStatus to TestIsSuccessStatus in interfact_test.go and add some similar tests in TestIsWaitStatus.

@gx14ac
Copy link
Contributor Author

gx14ac commented Apr 17, 2022

It's better to add tests, you can rename TestStatus to TestIsSuccessStatus in interfact_test.go and add some similar tests in TestIsWaitStatus.

thank you.
I'll add a test!

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 17, 2022
@gx14ac
Copy link
Contributor Author

gx14ac commented Apr 17, 2022

@kerthcet I added some test code.
pls check!

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 27, 2022
@gx14ac
Copy link
Contributor Author

gx14ac commented Apr 28, 2022

thx. squashed

@denkensk
Copy link
Member

thx. squashed

@shintard You need to squash all the commits to one.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Apr 28, 2022
@gx14ac
Copy link
Contributor Author

gx14ac commented Apr 28, 2022

@denkensk I misunderstood the meaning of squash.
thank you.
commit in one.

@denkensk
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 28, 2022
@denkensk
Copy link
Member

/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 Apr 28, 2022
@Huang-Wei
Copy link
Member

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 28, 2022
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.

One small nits

pkg/scheduler/framework/interface.go Outdated Show resolved Hide resolved
@sanposhiho
Copy link
Member

(Let me remove lgtm for the above small change request.)
/remove-lgtm

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 30, 2022
@gx14ac
Copy link
Contributor Author

gx14ac commented May 4, 2022

@sanposhiho thx for the review.

Co-authored-by: Alex Wang <453102040@qq.com>
@sanposhiho
Copy link
Member

/retest
/lgtm

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

@shintard: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-integration 2298440 link unknown /test pull-kubernetes-integration

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.

@sanposhiho
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot merged commit 78faab2 into kubernetes:master May 4, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone May 4, 2022
@alculquicondor
Copy link
Member

Did you open a bug for the flaky tests?

@sanposhiho
Copy link
Member

No.
will create an issue later.

@sanposhiho
Copy link
Member

sanposhiho commented May 4, 2022

Created: #109785

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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. 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.

None yet

7 participants