Skip to content

Conversation

sivchari
Copy link
Member

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

Signed-off-by: sivchari <[email protected]>
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 15, 2025
@k8s-ci-robot
Copy link
Contributor

@sivchari: The label(s) area/test cannot be applied, because the repository doesn't have them.

In response to this:

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

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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels May 15, 2025
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 15, 2025
@sivchari
Copy link
Member Author

/area ci

@k8s-ci-robot k8s-ci-robot added area/ci Issues or PRs related to ci and removed do-not-merge/needs-area PR is missing an area label labels May 15, 2025
@sbueringer
Copy link
Member

/assign @fabriziopandini

Let's change the PR title to provide more context where we are fixing something

@sivchari
Copy link
Member Author

/retitle 🌱 Ignore net.ErrClosed error when we already closed lister connection.

@k8s-ci-robot k8s-ci-robot changed the title 🌱 Ignore net.ErrClosed 🌱 Ignore net.ErrClosed error when we already closed lister connection. May 15, 2025
Copy link
Member

@fabriziopandini fabriziopandini left a 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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 16, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: d01a01cb3c0954195e13fff4667687031d88ee99

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 16, 2025
@k8s-ci-robot k8s-ci-robot merged commit 2953d63 into kubernetes-sigs:main May 16, 2025
27 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.11 milestone May 16, 2025
@sbueringer sbueringer changed the title 🌱 Ignore net.ErrClosed error when we already closed lister connection. 🌱 CAPIM: Ignore net.ErrClosed error when we already closed lister connection. May 16, 2025

if wcl.listener != nil {
if err := wcl.listener.Close(); err != nil {
if err := wcl.listener.Close(); !errors.Is(err, net.ErrClosed) {
Copy link
Member

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

Copy link
Member Author

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.

@sbueringer sbueringer changed the title 🌱 CAPIM: Ignore net.ErrClosed error when we already closed lister connection. 🌱 CAPIM: mux: Ignore net.ErrClosed error during listener close & server shutdown May 16, 2025
@sbueringer sbueringer removed the area/ci Issues or PRs related to ci label May 16, 2025
@k8s-ci-robot
Copy link
Contributor

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 /area ${COMPONENT} in a comment

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.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/needs-area PR is missing an area label label May 16, 2025
@sbueringer sbueringer removed the do-not-merge/needs-area PR is missing an area label label May 16, 2025
@sbueringer sbueringer added the area/provider/infrastructure-in-memory Issues or PRs related to the in-memory infrastructure provider label May 16, 2025
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. area/provider/infrastructure-in-memory Issues or PRs related to the in-memory infrastructure provider 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants