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

Fix pod's deadline to nil when cache ttl is set to zero #110954

Merged

Conversation

kerthcet
Copy link
Member

@kerthcet kerthcet commented Jul 5, 2022

Signed-off-by: kerthcet kerthcet@gmail.com

What type of PR is this?

/kind bug
/sig scheduling

What this PR does / why we need it:

Pod's deadline in podState should be nil when we set the cache ttl to zero.

Which issue(s) this PR fixes:

Part of #106361

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

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


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 5, 2022
@k8s-ci-robot
Copy link
Contributor

@kerthcet: 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 Jul 5, 2022
@alculquicondor
Copy link
Member

Is this a bug or a cleanup?

If it's a cleanup, maybe not worth merging, since we plan to remove the code anyways

/shrug

@k8s-ci-robot k8s-ci-robot added the ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯ label Jul 5, 2022
@kerthcet
Copy link
Member Author

kerthcet commented Jul 5, 2022

Is this a bug or a cleanup?

Honestly I would like to treat it as a bug for we have data error internal, but it has no side effect up to now.

If it's a cleanup, maybe not worth merging, since we plan to remove the code anyways

As discussed before, we still have two more releases before we finally remove them, and this discussion is still pending, I think we should fix it.

@alculquicondor
Copy link
Member

Honestly I would like to treat it as a bug for we have data error internal, but it has no side effect up to now.

That's a cleanup then. It has no real effect and all the information is in-memory (not in etcd).

/type cleanup
/remove-type bug

pkg/scheduler/internal/cache/cache_test.go Outdated Show resolved Hide resolved
pkg/scheduler/internal/cache/cache_test.go Outdated Show resolved Hide resolved
@@ -53,7 +53,7 @@ import (
const (
// Duration the scheduler will wait before expiring an assumed pod.
// See issue #106361 for more details about this parameter and its value.
durationToExpireAssumedPod = 0 * time.Minute
durationToExpireAssumedPod = 0 * time.Second
Copy link
Member

Choose a reason for hiding this comment

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

I think you could leave this like so:

Suggested change
durationToExpireAssumedPod = 0 * time.Second
durationToExpireAssumedPod = 0

or

Suggested change
durationToExpireAssumedPod = 0 * time.Second
durationToExpireAssumedPod time.Duration = 0

Copy link
Member Author

Choose a reason for hiding this comment

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

Picked the second one.

@alculquicondor
Copy link
Member

Please squash

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Jul 5, 2022
Signed-off-by: kerthcet <kerthcet@gmail.com>
@kerthcet
Copy link
Member Author

kerthcet commented Jul 5, 2022

squashed.

@kerthcet kerthcet force-pushed the fix/deadline-should-be-nil branch from 308322e to 72e8fc1 Compare July 5, 2022 15:29
@alculquicondor
Copy link
Member

/lgtm
/priority backlog

@k8s-ci-robot
Copy link
Contributor

@kerthcet: you cannot LGTM your own PR.

In response to this:

Since @alculquicondor has lgtmed but not triggered by the CI, I'll add this label again.
/lgtm

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.

@kerthcet
Copy link
Member Author

kerthcet commented Jul 6, 2022

Plz add lgtm again @alculquicondor the CI didn't work last time. Thanks.

@alculquicondor
Copy link
Member

/lgtm
/priority backlog

@k8s-ci-robot k8s-ci-robot added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 6, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 6, 2022
@alculquicondor
Copy link
Member

flaky test: #110962

/retest

@ahg-g
Copy link
Member

ahg-g commented Oct 31, 2022

/remove-kind bug
/kind cleanup

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/bug Categorizes issue or PR as related to a bug. labels Oct 31, 2022
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-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/backlog Higher priority than priority/awaiting-more-evidence. 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/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.

None yet

4 participants