Content-Length: 487695 | pFad | http://github.com/kubernetes/kubernetes/pull/132109

C9 Clean backoff record earlier by linxiulei · Pull Request #132109 · kubernetes/kubernetes · GitHub
Skip to content

Clean backoff record earlier #132109

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

Merged
merged 1 commit into from
Jun 6, 2025
Merged

Conversation

linxiulei
Copy link
Contributor

@linxiulei linxiulei commented Jun 5, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #132042

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix a bug causing unexpected delay of creating pods for newly created jobs

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


@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. 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. kind/bug Categorizes issue or PR as related to a bug. release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. sig/apps Categorizes an issue or PR as relevant to SIG Apps. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 5, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in SIG Apps Jun 5, 2025
@k8s-ci-robot k8s-ci-robot requested review from krmayankk and soltysh June 5, 2025 02: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 Jun 5, 2025
@mimowo
Copy link
Contributor

mimowo commented Jun 5, 2025

Does this PR introduce a user-facing change?

please add release note, certainly this PR results in user-facing change.

@mimowo
Copy link
Contributor

mimowo commented Jun 5, 2025

@linxiulei I left some comments. Overall I think this approach could work, but I have some hesitations about corner cases races.

I'm wondering if another approach is simpler, like clearing the backoffStore in case the Job is newly created, based on empty Status, for example detected by checking that status.startTime=nil (this way we can tell this is the first reconcile). wdyt?

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 5, 2025
@linxiulei linxiulei changed the title use uid as key for backoffStore Clear stale states when seeing a newly created job Jun 5, 2025
@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 5, 2025
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 6, 2025
Once received job deletion event, it cleans the backoff records for that
job before enqueueing this job so that we can avoid a race condition
that the syncJob() may incorrect use stale backoff records for a newly created
job with same key.

Co-authored-by: Michal Wozniak <michalwozniak@google.com>
@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 Jun 6, 2025
@atiratree
Copy link
Member

/triage accepted
/priority important
/approve

leaving the final tag on @mimowo

@k8s-ci-robot
Copy link
Contributor

@atiratree: The label(s) priority/important cannot be applied, because the repository doesn't have them.

In response to this:

/triage accepted
/priority important
/approve

leaving the final tag on @mimowo

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 triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 6, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Jun 6, 2025
@atiratree
Copy link
Member

/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jun 6, 2025
@mimowo
Copy link
Contributor

mimowo commented Jun 6, 2025

/lgtm

Leaving approve to @atiratree

I'm supportive to cherry-pick, because:

  • the risk is minimal given the size of the change and the amount of testing it received in the process, the change only affects the in-memory state of the backoff delay
  • the issue is affecting JobSet quite often as it satisfies all conditions for the issue to appear: creates many Job instances, and reacts to Job failures by re-creating under the same, indexed name. For large Jobs with many Pods this can result in waiting very long for the replacement Pods.

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

LGTM label has been added.

Git tree hash: be1742a7c6964d7974931b018c879997e30d92f6

@k8s-ci-robot k8s-ci-robot merged commit a26f3fd into kubernetes:master Jun 6, 2025
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.34 milestone Jun 6, 2025
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in SIG Apps Jun 6, 2025
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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. 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. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unexpected Pod creation delay after recreating Jobs with same names
5 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/kubernetes/kubernetes/pull/132109

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy