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

Automated cherry pick of #119434: Include ignored pods when computing backoff delay for Job pod #119466

Conversation

mimowo
Copy link
Contributor

@mimowo mimowo commented Jul 20, 2023

Cherry pick of #119434 on release-1.27. PRs:

  1. Include ignored pods when computing backoff delay for Job pod failures #119434: Include ignored pods when computing backoff delay for Job pod
  2. Adjust the algorithm for computing the pod finish time #118413: Adjust the algorithm for computing the pod finish time

PR (2.) is added to ensure the new test passes.

For details on the cherry pick process, see the cherry pick requests page.

Fix computing backoff delay when using Job pod failure policy, by including in the backoff delay calculation pod failures ignored from the backoffLimit counter.

Also, compute the backoff delay more accurately for deleted pods.

@k8s-ci-robot k8s-ci-robot added this to the v1.27 milestone Jul 20, 2023
@k8s-ci-robot k8s-ci-robot added do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. 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-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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 20, 2023
@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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/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. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 20, 2023
@mimowo
Copy link
Contributor Author

mimowo commented Jul 20, 2023

/assign @alculquicondor
One complication with the cherry-pick is that 1.27 doesn't have the refactoring of the computation of the finish time: #118413, and so in 1.27 the finishTime fallbacks to now.

Some of the existing unit test cases in TestSyncJobWithJobPodFailurePolicy (using the ignore rule), are sensitive to it and started to failed, because they expected wantStatusActive: 1, which would be 0 due to delayed pod recreation. Since the intention of the test cases is to check if the pod is ignored from counting I have adjusted such test cases to set FinishedAt as testFininishedAtTime which is in the past, to make sure they continue to pass.

A dedicated test case for delayed pod recreation with wantStatusActive: 0 is cherry-picked.

EDIT: an alternative would be to cherry-pick the new algorithm for finish time computation, but it does not seem to be warranted by this fix itself.

@alculquicondor
Copy link
Member

I prefer we cherry-pick both PRs

Change-Id: Ic282a57169cab8dc498574f08b081914218a1039
@mimowo
Copy link
Contributor Author

mimowo commented Jul 20, 2023

I prefer we cherry-pick both PRs

Ok, then we need to merge this one first: #119477.

@mimowo mimowo force-pushed the automated-cherry-pick-of-#119434-upstream-release-1.27 branch from cc8e7a3 to 942e600 Compare July 20, 2023 14:44
@mimowo
Copy link
Contributor Author

mimowo commented Jul 20, 2023

Ok, then we need to merge this one first: #119477.

And it this PR I reverted the test changes. Just left the conflict resolution changes related to syncJobCtx. This means that the unit tests will fail now, but will start passing once rebased after the other PR is merged

@alculquicondor
Copy link
Member

I suggest you put them in one PR (separate commits)

@mimowo mimowo force-pushed the automated-cherry-pick-of-#119434-upstream-release-1.27 branch from 942e600 to ed0cdc9 Compare July 21, 2023 07:33
@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 Jul 21, 2023
@mimowo
Copy link
Contributor Author

mimowo commented Jul 21, 2023

I suggest you put them in one PR (separate commits)

Ok, the previous PR included 2 commits, so cherry-picked them both here. I've also included the release not from the other PR here.

@alculquicondor
Copy link
Member

Please update the description to reflect that there is more than one PR cherry-picked.

@alculquicondor
Copy link
Member

/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 Jul 27, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7643579cc3bdf47a5cf08b2ed87ea8b5112a1c3b

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2023
@alculquicondor
Copy link
Member

/kind bug
/cc kubernetes/release-managers

@k8s-ci-robot k8s-ci-robot requested a review from a team July 27, 2023 14:34
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Jul 27, 2023
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

Doesn't qualify for cherry-picking to earlier branches: https://kubernetes.slack.com/archives/CJH2GBF7Y/p1690969553863649?thread_ts=1690961038.586229&cid=CJH2GBF7Y
For RelEng:
/lgtm
/approve

@xmudrii xmudrii added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Aug 2, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. label Aug 2, 2023
@mimowo
Copy link
Contributor Author

mimowo commented Aug 2, 2023

Note that this issue also affects 1.26, but the fix cannot be cherry-picked there in this form, as it is based on the refactoring which as done in 1.27: #114768.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, mimowo, xmudrii

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

@xmudrii
Copy link
Member

xmudrii commented Aug 2, 2023

/retest

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Aug 2, 2023

@mimowo: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-e2e-gce ed0cdc9 link unknown /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@mimowo
Copy link
Contributor Author

mimowo commented Aug 2, 2023

/test pull-kubernetes-e2e-gce

@k8s-ci-robot k8s-ci-robot merged commit 559f43d into kubernetes:release-1.27 Aug 2, 2023
13 of 14 checks passed
@mimowo mimowo deleted the automated-cherry-pick-of-#119434-upstream-release-1.27 branch November 29, 2023 15:01
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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants