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

Do not clean Job tracking finalizer for Pods owned by non-batch/Job #124798

Merged

Conversation

mimowo
Copy link
Contributor

@mimowo mimowo commented May 10, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Discovered during #123273, where we decided that the finalizer should not be deleted from Job, if the owner is a batch Job with a custom managedBy.

Does this PR introduce a user-facing change?

Do not remove the "batch.kubernetes.io/job-tracking" finalizer from a Pod, in a corner
case scenario, when the Pod is controlled by an API object which is not a batch Job
(e.g. when the Pod is controlled by a custom CRD).

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


@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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 10, 2024
@k8s-ci-robot
Copy link
Contributor

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/test sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 10, 2024
@mimowo mimowo force-pushed the do-not-remove-job-finalizers-from-crd branch from d5b34e5 to 6f5d046 Compare May 10, 2024 14:58
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 10, 2024
@mimowo mimowo force-pushed the do-not-remove-job-finalizers-from-crd branch from 6f5d046 to b732498 Compare May 10, 2024 14:58
@mimowo mimowo changed the title Do not clean finalizers for Pods controlled by not batch/Job Do not clean Job tracking finalizer for Pods owned by non-batch/Job May 10, 2024
@mimowo
Copy link
Contributor Author

mimowo commented May 10, 2024

/assign @atiratree

@mimowo
Copy link
Contributor Author

mimowo commented May 10, 2024

/cc @alculquicondor

@mimowo mimowo changed the title Do not clean Job tracking finalizer for Pods owned by non-batch/Job WIP Do not clean Job tracking finalizer for Pods owned by non-batch/Job May 10, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 10, 2024
@mimowo
Copy link
Contributor Author

mimowo commented May 10, 2024

Many tests fail, I will need to investigate why, marking as WIP.

EDIT: fixed by another approach, as here.

@mimowo mimowo force-pushed the do-not-remove-job-finalizers-from-crd branch 4 times, most recently from edc23c1 to f486521 Compare May 13, 2024 09:17
@mimowo mimowo force-pushed the do-not-remove-job-finalizers-from-crd branch from f486521 to 40791f7 Compare May 13, 2024 10:14
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 13, 2024
@mimowo mimowo force-pushed the do-not-remove-job-finalizers-from-crd branch from 40791f7 to ed29919 Compare May 13, 2024 10:41
@mimowo mimowo changed the title WIP Do not clean Job tracking finalizer for Pods owned by non-batch/Job Do not clean Job tracking finalizer for Pods owned by non-batch/Job May 13, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2024
@mimowo mimowo force-pushed the do-not-remove-job-finalizers-from-crd branch 2 times, most recently from 779e243 to 179bdf9 Compare May 13, 2024 11:59
@mimowo
Copy link
Contributor Author

mimowo commented May 13, 2024

/test pull-kubernetes-e2e-kind-ipv6
Unrelated failure of "[sig-node] Mount propagation should propagate mounts within defined scopes"

pkg/controller/job/job_controller.go Outdated Show resolved Hide resolved
pkg/controller/job/job_controller_test.go Show resolved Hide resolved
pkg/controller/job/job_controller_test.go Outdated Show resolved Hide resolved
pkg/controller/job/job_controller_test.go Outdated Show resolved Hide resolved
test/integration/job/job_test.go Outdated Show resolved Hide resolved
@mimowo mimowo force-pushed the do-not-remove-job-finalizers-from-crd branch from 2e71b89 to a014845 Compare May 14, 2024 08:38
@atiratree
Copy link
Member

Can you also squash the commits and make the release note more readable (#124798 (comment))?

otherwise lgtm

@mimowo mimowo force-pushed the do-not-remove-job-finalizers-from-crd branch from a014845 to a6c9d5b Compare May 14, 2024 15:29
@mimowo
Copy link
Contributor Author

mimowo commented May 14, 2024

@atiratree I squashed the PR and updated the release note. PTAL

@atiratree
Copy link
Member

thx!
/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 14, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: cf2f35fd0be97e1cbc4ad1c15727681f849eff54

@atiratree
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: atiratree, mimowo

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 May 14, 2024
@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@k8s-ci-robot k8s-ci-robot merged commit 59da273 into kubernetes:master May 14, 2024
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.31 milestone May 14, 2024
@mimowo mimowo deleted the do-not-remove-job-finalizers-from-crd branch May 29, 2024 14:55
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. area/test 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. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants