-
Notifications
You must be signed in to change notification settings - Fork 105
nmstatectl: context for command and timeout for Run #1339
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
base: main
Are you sure you want to change the base?
Conversation
This commit adds a context to the function executing nmstatectl on the host. Thanks to this, we can add timeout of 10 seconds to every execution of `nmstatectl show`. Given this is a reasonable time in which this should finish, we will prevent process from hanging in rare cases when `show` takes infinite amount of time to finish. Signed-off-by: Mat Kowalski <[email protected]>
Reviewer's GuideThe PR refactors nmstatectl command invocations to use Go contexts, enabling a default 10-second timeout on File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
⛔ Snyk checks have failed. 114 issues have been found so far.
⛔ security/snyk check is complete. 114 issues have been found. (View Details) 💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mkowalski - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
@mkowalski: The following tests failed, say
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. I understand the commands that are listed here. |
|
PR needs rebase. 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. |
This commit adds a context to the function executing nmstatectl on the host. Thanks to this, we can add timeout of 10 seconds to every execution of
nmstatectl show.Given this is a reasonable time in which this should finish, we will prevent process from hanging in rare cases when
showtakes infinite amount of time to finish.Is this a BUG FIX or a FEATURE ?:
/kind bug
What this PR does / why we need it:
Special notes for your reviewer:
Release note:
Summary by Sourcery
Add context support to nmstatectl invocations, migrate to exec.CommandContext, and enforce a 10s timeout on the Show command to avoid indefinite hangs.
Enhancements: