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

Make ordering timestamp configurable when Workload evicted due to Pods-ready #1542

Merged

Conversation

nstogner
Copy link
Contributor

@nstogner nstogner commented Jan 3, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Allow admins to choose the timestamp used for sorting workloads after eviction due to wait-for-pods-ready. See KEP-1282.

Which issue(s) this PR fixes:

Fixes #1282

Special notes for your reviewer:

Does this PR introduce a user-facing change?

WaitForPodsReady: Add a config field to allow admins to configure the timestamp used when sorting workloads that were evicted due to their Pods not becoming ready on time.

@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/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 3, 2024
Copy link

netlify bot commented Jan 3, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit edc8d7d
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/65a84a311158a60008dbd044

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 3, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @nstogner. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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 the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 3, 2024
@nstogner
Copy link
Contributor Author

nstogner commented Jan 3, 2024

PS: I still need to add the user-story test case.

@tenzen-y
Copy link
Member

tenzen-y commented Jan 3, 2024

/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 Jan 3, 2024
@nstogner nstogner force-pushed the pods-ready-requeue-strategy branch 3 times, most recently from 432f4d7 to 6a1ed38 Compare January 5, 2024 16:20
@tenzen-y
Copy link
Member

tenzen-y commented Jan 5, 2024

/assign

@nstogner nstogner force-pushed the pods-ready-requeue-strategy branch 2 times, most recently from 62414b3 to 8d32336 Compare January 9, 2024 23:54
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 9, 2024
@alculquicondor
Copy link
Contributor

/assign @mimowo

@mimowo
Copy link
Contributor

mimowo commented Jan 10, 2024

/assign @mimowo

ack

apis/config/v1beta1/configuration_types.go Outdated Show resolved Hide resolved
@@ -111,12 +110,15 @@ func SetDefaults_Configuration(cfg *Configuration) {
}
cfg.WaitForPodsReady.BlockAdmission = &defaultBlockAdmission
}
if cfg.WaitForPodsReady.RequeuingTimestamp == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use checking the nil here

DefaultQueueVisibilityUpdateIntervalSeconds int32 = 5
DefaultClusterQueuesMaxCount int32 = 10
DefaultJobFrameworkName = "batch/job"
Copy link
Contributor

Choose a reason for hiding this comment

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

This change might be ok, but seems unrelated, so I would suggest reverting it so that the PR is focused.

Copy link
Contributor Author

@nstogner nstogner Jan 11, 2024

Choose a reason for hiding this comment

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

I think I added this to avoid an import cycle. I updated the tests to be in a dedicated _test package to make sure we keep the constants in sync.

Copy link
Contributor

Choose a reason for hiding this comment

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

sgtm, if required to avoid the cycle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted package change

@@ -370,6 +371,13 @@ func waitForPodsReady(cfg *configapi.Configuration) bool {
return cfg.WaitForPodsReady != nil && cfg.WaitForPodsReady.Enable
}

func podsReadyRequeuingTimestamp(cfg *configapi.Configuration) configapi.RequeuingTimestamp {
if cfg.WaitForPodsReady != nil {
return cfg.WaitForPodsReady.RequeuingTimestamp
Copy link
Contributor

Choose a reason for hiding this comment

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

If we go for ptr, I think we will also need to check it is not nil here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or use ptr.Deref

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to pointer and added nil check

if cfg.WaitForPodsReady != nil {
return cfg.WaitForPodsReady.RequeuingTimestamp
}
return ""
Copy link
Contributor

Choose a reason for hiding this comment

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

let's return Eviction here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

pkg/queue/cluster_queue_strict_fifo_test.go Show resolved Hide resolved

func (e entryOrdering) Len() int {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would suggest reverting the renames, but feel free to keep

Copy link
Member

Choose a reason for hiding this comment

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

I also think that the previous receiver name, e would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

if c := apimeta.FindStatusCondition(w.Status.Conditions, kueue.WorkloadEvicted); c != nil && c.Status == metav1.ConditionTrue && c.Reason == kueue.WorkloadEvictedByPodsReadyTimeout {
return &c.LastTransitionTime
func (o Ordering) GetQueueOrderTimestamp(w *kueue.Workload) *metav1.Time {
if o.PodsReadyRequeuingTimestamp == config.Eviction || o.PodsReadyRequeuingTimestamp == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if o.PodsReadyRequeuingTimestamp == config.Eviction || o.PodsReadyRequeuingTimestamp == "" {
if o.PodsReadyRequeuingTimestamp == config.Eviction {

Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be needed, if we adjust fallback in podsReadyRequeuingTimestamp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

gomega.Expect(createdEquivJob2.Spec.Template.Spec.NodeSelector[instanceKey]).Should(gomega.Equal(equivalentFlavorB.Name))
util.ExpectPendingWorkloadsMetric(equivalentClusterQ, 0, 0)

time.Sleep(time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see the first sleep is needed to make sure the creation timestamps differ.

However, can we simplify the scenario, so that it captures the change, but uses at most one sleep(1s)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing these tests as per Aldo's comment

gomega.Expect(k8sClient.Create(ctx, wl1)).Should(gomega.Succeed())
time.Sleep(time.Second)
gomega.Expect(k8sClient.Create(ctx, wl2)).Should(gomega.Succeed())
time.Sleep(time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly here, can we capture the essence with just 1 sleep?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The expectation here is workload 1 gets admitted (need spacing between 1 & 2), then workload 2 gets admitted (need spacing between 2 & 3 to make this consistent), then workload 1 gets admitted again. I think we need the workloads to be spaced out in time to have trigger this behavior and maintain the conditions being asserted on.

Copy link
Contributor

Choose a reason for hiding this comment

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

sgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out that my test was wrong and wl2 was getting admitted on borrowed capacity. I simplified the test to get rid of borrowed capacity and use 2 workloads and 1 sleep.

Copy link
Contributor

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

I can think of an alternative approach in which we add a timestamp field in Workload.Info that is populated by the queue manager as the workloads are added or updated. Then the rest of the system can use this cached timestamp without having to understand where it's coming from.

It might simplify some code, but I'll leave it up to you to decide which approach to keep.


const (
// Creation timestamp (from Workload .metadata.creationTimestamp).
Creation RequeuingTimestamp = "Creation"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Creation RequeuingTimestamp = "Creation"
CreationTimestamp RequeuingTimestamp = "Creation"

Creation RequeuingTimestamp = "Creation"

// Eviction timestamp (from Workload .status.conditions).
Eviction RequeuingTimestamp = "Eviction"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Eviction RequeuingTimestamp = "Eviction"
EvictionTimestamp RequeuingTimestamp = "Eviction"

apis/config/v1beta1/defaults_test.go Outdated Show resolved Hide resolved
@@ -370,6 +371,13 @@ func waitForPodsReady(cfg *configapi.Configuration) bool {
return cfg.WaitForPodsReady != nil && cfg.WaitForPodsReady.Enable
}

func podsReadyRequeuingTimestamp(cfg *configapi.Configuration) configapi.RequeuingTimestamp {
if cfg.WaitForPodsReady != nil {
return cfg.WaitForPodsReady.RequeuingTimestamp
Copy link
Contributor

Choose a reason for hiding this comment

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

Or use ptr.Deref

pkg/queue/manager.go Outdated Show resolved Hide resolved
pkg/scheduler/scheduler.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 12, 2024
UpdateIntervalSeconds: 10,
ClusterQueues: &ClusterQueueVisibility{
ClusterQueues: &v1beta1.ClusterQueueVisibility{
MaxCount: 0,
},
},
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a case, "defaulting waitForPodsReady.RequeuingTimestamp"?

Copy link
Contributor Author

@nstogner nstogner Jan 15, 2024

Choose a reason for hiding this comment

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

The assertion is being captured in the renamed defaulting waitForPodsReady.* case ... it was already asserting on other waitForPodsReady fields.

Copy link
Member

Choose a reason for hiding this comment

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

It makes sense.

func GetQueueOrderTimestamp(w *kueue.Workload) *metav1.Time {
if c := apimeta.FindStatusCondition(w.Status.Conditions, kueue.WorkloadEvicted); c != nil && c.Status == metav1.ConditionTrue && c.Reason == kueue.WorkloadEvictedByPodsReadyTimeout {
return &c.LastTransitionTime
func (o Ordering) GetQueueOrderTimestamp(w *kueue.Workload) *metav1.Time {
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a unit test since this function is exported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test is there, updated it just now

pkg/scheduler/scheduler.go Outdated Show resolved Hide resolved

func (e entryOrdering) Len() int {
Copy link
Member

Choose a reason for hiding this comment

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

I also think that the previous receiver name, e would be better.

@tenzen-y
Copy link
Member

/kind api-change

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 15, 2024
@nstogner nstogner force-pushed the pods-ready-requeue-strategy branch 2 times, most recently from 24ec9d2 to 64404b5 Compare January 15, 2024 20:17
@nstogner
Copy link
Contributor Author

I can think of an alternative approach in which we add a timestamp field in Workload.Info that is populated by the queue manager as the workloads are added or updated. Then the rest of the system can use this cached timestamp without having to understand where it's coming from.

It might simplify some code, but I'll leave it up to you to decide which approach to keep.

Ah, I missed you comment and implemented all of the other requested changes. I am looking at what you suggested now.

@nstogner
Copy link
Contributor Author

I can think of an alternative approach in which we add a timestamp field in Workload.Info that is populated by the queue manager as the workloads are added or updated. Then the rest of the system can use this cached timestamp without having to understand where it's coming from.
It might simplify some code, but I'll leave it up to you to decide which approach to keep.

Ah, I missed you comment and implemented all of the other requested changes. I am looking at what you suggested now.

While I think this would remove some of the configuration propagation that is occurring at the moment, it seems a bit unnatural to carry a global config value around in each instance of a Workload (via type Info). This value determines how multiple workloads get sorted against eachother. It might be a little confusing to pull this value from a given instance of a workload itself to then compare the rest of the workloads for sorting.

Comment on lines 114 to 115
defaultRequeuingTimestamp := EvictionTimestamp
cfg.WaitForPodsReady.RequeuingTimestamp = &defaultRequeuingTimestamp
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
defaultRequeuingTimestamp := EvictionTimestamp
cfg.WaitForPodsReady.RequeuingTimestamp = &defaultRequeuingTimestamp
cfg.WaitForPodsReady.RequeuingTimestamp = ptr.To(EvictionTimestamp)

@@ -38,7 +39,10 @@ func TestFIFOClusterQueue(t *testing.T) {
Spec: kueue.ClusterQueueSpec{
Copy link
Contributor

Choose a reason for hiding this comment

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

I actually preferred putting &kueue.ClusterQueue in a new line.

Copy link
Contributor Author

@nstogner nstogner Jan 16, 2024

Choose a reason for hiding this comment

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

Changing back to new line

})

ginkgo.By("waiting the timeout, the first workload should be evicted and readmitted", func() {
time.Sleep(podsReadyTimeout)
Copy link
Contributor

Choose a reason for hiding this comment

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

Use Eventually to detect that the Workload gets the Eviction condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

util.FinishEvictionForWorkloads() has a retry loop built in - using that and removing the sleep.

})

ginkgo.By("waiting the timeout, the first workload should be evicted and the second should be admitted", func() {
time.Sleep(podsReadyTimeout)
Copy link
Contributor

Choose a reason for hiding this comment

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

Use Eventually to detect that the Workload gets the Eviction condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing the sleep

@alculquicondor
Copy link
Contributor

/approve
I'm leaving LGTM to @mimowo or @tenzen-y

@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 15, 2024
Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

just some nits.

@@ -41,6 +39,7 @@ const (
defaultPodsReadyTimeout = 5 * time.Minute
DefaultQueueVisibilityUpdateIntervalSeconds int32 = 5
DefaultClusterQueuesMaxCount int32 = 10
DefaultJobFrameworkName = "batch/job"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
DefaultJobFrameworkName = "batch/job"
defaultJobFrameworkName = "batch/job"

Is this constant used from external packages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, un-exporting

UpdateIntervalSeconds: 10,
ClusterQueues: &ClusterQueueVisibility{
ClusterQueues: &v1beta1.ClusterQueueVisibility{
MaxCount: 0,
},
},
Copy link
Member

Choose a reason for hiding this comment

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

It makes sense.

@@ -312,7 +310,7 @@ func TestSetDefaults_Configuration(t *testing.T) {
QueueVisibility: defaultQueueVisibility,
},
},
"defaulting waitForPodsReady.timeout": {
"defaulting waitForPodsReady.*": {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"defaulting waitForPodsReady.*": {
"defaulting waitForPodsReady values": {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@@ -35,8 +36,14 @@ const (
defaultNamespace = "default"
)

var (
defaultQueueOrdering = queueOrderingFunc(workload.Ordering{
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
defaultQueueOrdering = queueOrderingFunc(workload.Ordering{
defaultQueueOrderingFunc = queueOrderingFunc(workload.Ordering{

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

})

ginkgo.It("Should prioritize workloads submitted earlier", func() {
localQueueName := "eviction-creation-lq"
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to define a new lq? Should we use prodQueue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, removing

})

ginkgo.It("Should keep the evicted workload at the front of the queue", func() {
localQueueName := "eviction-creation-lq"
Copy link
Member

Choose a reason for hiding this comment

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

Here is the same comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing

ginkgo.By("waiting the timeout, the first workload should be evicted and readmitted", func() {
time.Sleep(podsReadyTimeout)
util.FinishEvictionForWorkloads(ctx, k8sClient, wl1)
util.ExpectWorkloadsToHaveQuotaReservation(ctx, k8sClient, prodClusterQ.Name, wl1)
Copy link
Contributor

@mimowo mimowo Jan 16, 2024

Choose a reason for hiding this comment

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

Should we also verify what happens to wl2, does it remain pending?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, it gets admitted via borrowed capacity from the dev queue. I am now creating a standalone queue and asserting that it does not get admitted.

Copy link
Contributor

Choose a reason for hiding this comment

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

sgtm

Comment on lines 561 to 563
defer func() {
gomega.Expect(util.DeleteClusterQueue(ctx, k8sClient, standaloneClusterQ)).Should(gomega.Succeed())
}()
Copy link
Member

Choose a reason for hiding this comment

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

Should we perform this in ginkgo.AfterEach in this Context node instead of the defer?

Copy link
Contributor

Choose a reason for hiding this comment

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

IIUC this is because the queues are declared only within the It, while the AfterEach is for all tests.
Alternatively, we could declare the variable for all tests in the context, and in afterEach delete in not nil, but I don't hold a view which one is better.

Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, we could declare the variable for all tests in the context, and in afterEach delete in not nil

Yes, if we want to use AfterEach, we must put standaloneClusterQ on the line 548.

but I don't hold a view which one is better.

I would suggest using AfterEach.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated to use a JustBeforeEach() (cant use BeforeEach() b/c you need the k8sClient) and an AfterEach().

Copy link
Member

Choose a reason for hiding this comment

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

Ah, we set up k8client in the JustBeforeEach() node...
Ideally, we want to set up the k8sclient in the BeforeAll() or BeforeEach(). However, I think the investigation is out of scope in this PR.

Comment on lines 567 to 569
defer func() {
gomega.Expect(util.DeleteLocalQueue(ctx, k8sClient, standaloneQueue)).Should(gomega.Succeed())
}()
Copy link
Member

Choose a reason for hiding this comment

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

ditto.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@tenzen-y
Copy link
Member

Due to #1593
/test pull-kueue-test-e2e-main-1-28

@@ -192,8 +192,22 @@ type WaitForPodsReady struct {
// until the jobs reach the PodsReady=true condition. It defaults to false if Enable is false
// and defaults to true otherwise.
BlockAdmission *bool `json:"blockAdmission,omitempty"`

// RequeuingTimestamp defines the timestamp used for requeuing a Workload
// that was evicted due to Pod readiness. Defaults to Eviction (back of queue).
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if "(back of queue)" could be misleading, there could be lower priority workloads that are even more behind in the queue order, because priority is checked first:

p1 := utilpriority.Priority(objA.Obj)
p2 := utilpriority.Priority(objB.Obj)
if p1 != p2 {
return p1 > p2
}
. I would suggest to just remove the text in the brackets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, done

Copy link
Contributor

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

/approve
Please address the suggestions for the integration test.

ginkgo.BeforeEach(func() {
podsReadyTimeout = 3 * time.Second
requeuingTimestamp = config.CreationTimestamp
})
Copy link
Contributor

Choose a reason for hiding this comment

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

there should be a corresponding AfterEach resetting the original values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not done in the other tests today (they all set these values in their BeforeEach()s). Would you like me to modify the others?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, yes, but we can leave it for a follow up.

Just add an AfterEach for this new case in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha, I guess it makes sense to add some variables for tracking the original values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Take a look at this commit to see if that is what you prefer.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@mimowo
Copy link
Contributor

mimowo commented Jan 18, 2024

LGTM

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

@nstogner Thank you!

/lgtm
/hold cancel

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

LGTM label has been added.

Git tree hash: 2d4a963ffcad71f03c8030b210b27ecb3b7f716e

@k8s-ci-robot k8s-ci-robot merged commit 36c2451 into kubernetes-sigs:main Jan 18, 2024
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.6 milestone Jan 18, 2024
@alculquicondor
Copy link
Contributor

/release-note-edit

Add a config field to `.waitForPodsReady` to allow admins to configure the timestamp used when sorting workloads that were evicted due to their Pods not becoming ready in time.

@alculquicondor
Copy link
Contributor

/release-note-edit

Add a config field to `.waitForPodsReady` to allow admins to configure the timestamp used when sorting workloads that were evicted due to their Pods not becoming ready on time.

@alculquicondor
Copy link
Contributor

/release-note-edit

WaitForPodsReady: Add a config field to allow admins to configure the timestamp used when sorting workloads that were evicted due to their Pods not becoming ready on time.

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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Policy to put Workloads in front of the queue after eviction
5 participants