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

Perform finalize processes when job is deleting #1342

Conversation

tenzen-y
Copy link
Member

@tenzen-y tenzen-y commented Nov 17, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

If the job is deleting, perform finalize processes. This can prevent the deletion of finalizers in the plain pod integration.

Which issue(s) this PR fixes:

Fixes #1339
Fixes #1340

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix a bug that plain pods managed by kueue will remain in a terminating state, due to a finalizer

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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 Nov 17, 2023
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2023
Copy link

netlify bot commented Nov 17, 2023

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 4c7dec7
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/65575857f434670008abf5b4

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 17, 2023
@tenzen-y tenzen-y force-pushed the perform-finalize-when-job-is-deleting branch from c26516a to 80c22d8 Compare November 17, 2023 11:24
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 17, 2023
@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 Nov 17, 2023
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@tenzen-y tenzen-y changed the title WIP: Perform finalize when job is deleting WIP: Perform finalize processes when job is deleting Nov 17, 2023
@tenzen-y tenzen-y changed the title WIP: Perform finalize processes when job is deleting Perform finalize processes when job is deleting Nov 17, 2023
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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 Nov 17, 2023
@tenzen-y
Copy link
Member Author

tenzen-y commented Nov 17, 2023

To avoid squashing @nstogner's contribution.

/label tide/merge-method-merge

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-merge Denotes a PR that should use a standard merge by tide when it merges. label Nov 17, 2023
@tenzen-y
Copy link
Member Author

cc @nstogner
/assign @trasc @mimowo

@tenzen-y
Copy link
Member Author

/cherry-pick release-0.5

@k8s-infra-cherrypick-robot

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

In response to this:

/cherry-pick release-0.5

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.

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.

Thanks!
/lgtm
/approve

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

LGTM label has been added.

Git tree hash: a0fd8fe5748adcc4b5940c656277f0eeb5e3db06

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, tenzen-y

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:
  • OWNERS [alculquicondor,tenzen-y]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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.

/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 Nov 17, 2023
@@ -159,6 +159,11 @@ func (r *JobReconciler) ReconcileGenericJob(ctx context.Context, req ctrl.Reques
return ctrl.Result{}, err
}
}
if !object.GetDeletionTimestamp().IsZero() {
Copy link
Contributor

Choose a reason for hiding this comment

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

mental note:
If client.Get can't find the object, the deletion timestamp is null, which IsZero knows how to handle.
/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 Nov 17, 2023
@k8s-ci-robot k8s-ci-robot merged commit 4405e35 into kubernetes-sigs:main Nov 17, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.6 milestone Nov 17, 2023
@k8s-infra-cherrypick-robot

@tenzen-y: new pull request created: #1343

In response to this:

/cherry-pick release-0.5

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

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 23, 2024
@alculquicondor
Copy link
Contributor

/release-note-edit

Fix a bug that plain pods managed by kueue will remain in a terminating state, due to a finalizer

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. tide/merge-method-merge Denotes a PR that should use a standard merge by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plain Pod remains in Terminating state after deleting
7 participants