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 finalizers for succeeded groups #1905

Merged
merged 1 commit into from Mar 25, 2024

Conversation

alculquicondor
Copy link
Contributor

@alculquicondor alculquicondor commented Mar 25, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

The initial attempt to clear finalizers after declaring a Workload as finished might fail partially. At this point, some succeeded pods might be gone, so the group can no longer be interpreted as finished. But we shouldn't be checking that again.

Which issue(s) this PR fixes:

Fixes #1898

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix Pods in Pod groups stuck with finalizers when deleted immediately after Succeeded

@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/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 25, 2024
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 25, 2024
Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit b59df4c
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/6601d25deb59710008d0f8d7
😎 Deploy Preview https://deploy-preview-1905--kubernetes-sigs-kueue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Change-Id: I7f17d51df66de6766af44e48f45b4165e8bd3e30
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor

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

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.

Basically, lgtm

Comment on lines +276 to 278
if err := r.finalizeJob(ctx, job); err != nil {
return ctrl.Result{}, err
}
Copy link
Member

Choose a reason for hiding this comment

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

Since this PR, we always finalize the Job when the Job has WorkloadFinished condition.
So, is this workload-controller mechanism still needed?

if len(wl.ObjectMeta.OwnerReferences) == 0 && !wl.DeletionTimestamp.IsZero() {
return ctrl.Result{}, workload.RemoveFinalizer(ctx, r.client, &wl)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It still helps in the case of a rogue user manually deleting finalizers.

But I'm also never sure which cases we are missing when dealing with finalizers. So I prefer to keep it.

Copy link
Member

Choose a reason for hiding this comment

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

That makes sense.
Thank you for the clarification!
/lgtm

@alculquicondor
Copy link
Contributor Author

/cherry-pick release-0.6

@k8s-infra-cherrypick-robot

@alculquicondor: once the present PR merges, I will cherry-pick it on top of release-0.6 in a new PR and assign it to you.

In response to this:

/cherry-pick release-0.6

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 lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 25, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7cd9ff8e054e24d92b08bacc57feb6e3349a5703

@alculquicondor
Copy link
Contributor Author

Let's do a few runs

1/5 passed.

/test pull-kueue-test-integration-main
/test pull-kueue-test-e2e-main-1-29
/test pull-kueue-test-e2e-main-1-28
/test pull-kueue-test-e2e-main-1-27

@alculquicondor
Copy link
Contributor Author

/hold

@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 Mar 25, 2024
@alculquicondor
Copy link
Contributor Author

/cherry-pick website

@k8s-infra-cherrypick-robot

@alculquicondor: once the present PR merges, I will cherry-pick it on top of website in a new PR and assign it to you.

In response to this:

/cherry-pick website

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.

@alculquicondor
Copy link
Contributor Author

Oops, I put the /cherry-pick on the wrong PR. I'll close the new PR when it's created.

@alculquicondor
Copy link
Contributor Author

2/5 passed.

/test pull-kueue-test-integration-main
/test pull-kueue-test-e2e-main-1-29
/test pull-kueue-test-e2e-main-1-28
/test pull-kueue-test-e2e-main-1-27

@alculquicondor
Copy link
Contributor Author

3/5 passed.

/test pull-kueue-test-integration-main
/test pull-kueue-test-e2e-main-1-29
/test pull-kueue-test-e2e-main-1-28
/test pull-kueue-test-e2e-main-1-27

@alculquicondor
Copy link
Contributor Author

4/5 passed.

/test pull-kueue-test-integration-main
/test pull-kueue-test-e2e-main-1-29
/test pull-kueue-test-e2e-main-1-28
/test pull-kueue-test-e2e-main-1-27
/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 Mar 25, 2024
@k8s-ci-robot k8s-ci-robot merged commit c169b58 into kubernetes-sigs:main Mar 25, 2024
13 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.7 milestone Mar 25, 2024
@k8s-infra-cherrypick-robot

@alculquicondor: new pull request created: #1908

In response to this:

/cherry-pick release-0.6

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-infra-cherrypick-robot

@alculquicondor: new pull request created: #1909

In response to this:

/cherry-pick website

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.

@alculquicondor
Copy link
Contributor Author

/cherry-pick release-0.6

@k8s-infra-cherrypick-robot

@alculquicondor: new pull request created: #1916

In response to this:

/cherry-pick release-0.6

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.

vsoch pushed a commit to researchapps/kueue that referenced this pull request Apr 18, 2024
Change-Id: I7f17d51df66de6766af44e48f45b4165e8bd3e30
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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky E2E test for pod groups
4 participants