[release-4.15] OCPBUGS-36812: fix sorting unpack jobs#817
Conversation
* fix sorting unpack jobs Signed-off-by: Ankita Thomas <ankithom@redhat.com> * Add test cases to reproduce panic Signed-off-by: Catherine Chan-Tse <cchantse@redhat.com> * handle nil jobs while sorting unpack jobs Signed-off-by: Ankita Thomas <ankithom@redhat.com> --------- Signed-off-by: Ankita Thomas <ankithom@redhat.com> Signed-off-by: Catherine Chan-Tse <cchantse@redhat.com> Co-authored-by: Catherine Chan-Tse <cchantse@redhat.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: 20a3cbcde1f46ed7f4d56042ccc8b5d962e4d1b8
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-36137 has been cloned as Jira Issue OCPBUGS-36812. Will retitle bug to link to clone. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-36812, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (jiazha@redhat.com), skipping review request. The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/retest |
|
|
||
| // cleanup old failed jobs, n-1 recent jobs and the oldest job | ||
| for i := 0; i < maxRetainedJobs && i+maxRetainedJobs < len(jobs); i++ { | ||
| for i := 0; i < maxRetainedJobs && i+maxRetainedJobs < len(jobs)-1; i++ { |
There was a problem hiding this comment.
Hi @ankitathomas, one concern here, if we use the < len(jobs)-1 here, it never returns the last child, which means will retain 6 jobs instead of 5. Is it as expected? Thanks!
maxRetainedJobs := 5 // TODO: make this configurableThere was a problem hiding this comment.
That's a good question! The intention there is to preserve the oldest failing unpack job for debugging purposes when this issue happens again, even when it allows for retrying the unpack.
There was a problem hiding this comment.
Aha, I see now, thanks!
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/test e2e-gcp-olm |
|
/label qe-approved |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-36812, which is valid. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (jiazha@redhat.com), skipping review request. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/approve |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jianzhangbjz, kevinrizza, openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@openshift-cherrypick-robot: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-36812: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-36812 has been moved to the MODIFIED state. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
[ART PR BUILD NOTIFIER] Distgit: operator-lifecycle-manager |
|
[ART PR BUILD NOTIFIER] Distgit: operator-registry |
This is an automated cherry-pick of #799
/assign ankitathomas