-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🌱 CAPIM: mux: Ignore net.ErrClosed error during listener close & server shutdown #12212
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
Conversation
Signed-off-by: sivchari <[email protected]>
@sivchari: The label(s) In 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 kubernetes-sigs/prow repository. |
/area ci |
/assign @fabriziopandini Let's change the PR title to provide more context where we are fixing something |
/retitle 🌱 Ignore net.ErrClosed error when we already closed lister connection. |
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.
PRs fixing flaky test are always the best ones!
/lgtm
/approve
LGTM label has been added. Git tree hash: d01a01cb3c0954195e13fff4667687031d88ee99
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
|
||
if wcl.listener != nil { | ||
if err := wcl.listener.Close(); err != nil { | ||
if err := wcl.listener.Close(); !errors.Is(err, net.ErrClosed) { |
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.
@sivchari @fabriziopandini We are now hitting l.616 if err is nil
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.
Oops, I'd follow up it.
This PR is currently missing an area label, which is used to identify the modified component when generating release notes. Area labels can be added by org members by writing Please see the labels list for possible areas. 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. |
What this PR does / why we need it:
TestMux is flaky since if the wcl.lister has already been closed, Close return net.ErrClosed.
This flaky depends on the timing of Serve.
So I made these ignore the error if the server is already closed.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
/area test
/kind bug