OCPBUGS-59311: must-gather: Handle signals properly#2237
OCPBUGS-59311: must-gather: Handle signals properly#2237tchap wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@tchap: This pull request references Jira Issue OCPBUGS-59311, which is invalid:
Comment 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughModified signal handling and context management in the mustgather operation. Introduced OS signal-aware context using Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tchap The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
089ce25 to
d10aa25
Compare
|
/jira refresh |
|
@tchap: This pull request references Jira Issue OCPBUGS-59311, which is valid. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (yinzhou@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. |
|
@tchap: 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. |
|
/verified by @tchap |
|
@tchap: This PR has been marked as verified by 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. |
| } | ||
| // stream gather container logs | ||
| if err := o.getGatherContainerLogs(ctx, pod); err != nil { | ||
| log("gather logs unavailable: %v", err) |
There was a problem hiding this comment.
I found this message extra when sending SIGINT.
|
/hold |
|
Once #2241 merges, this PR can be ready for review |
| defer func() { | ||
| // Shortcircuit this in case the context is already cancelled. | ||
| if ctx.Err() != nil { | ||
| klog.Warning("Reprinting cluster state skipped, terminating...") |
There was a problem hiding this comment.
It's not necessary, but when you actually send an interrupt, this message doesn't feel like it adds any value.
There was a problem hiding this comment.
Is it possible that we check the error type in ctx.Err and ignore this log only when user interrupts?
There was a problem hiding this comment.
ctx.Err is not gonna give enough information, it's canceled on a signal and there is no other way it can be canceled. If you want to particularly skip on os.Interrupt, it can be done.
Since
RunLogsContextis available now after rebase, I am finishing this issue.