Skip to content
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

🐛 Runnable group should check if stopped before enqueueing #2757

Merged
merged 1 commit into from Apr 5, 2024

Conversation

vincepri
Copy link
Member

@vincepri vincepri commented Apr 4, 2024

Fixes #2756

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 4, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 4, 2024
Signed-off-by: Vince Prignano <vincepri@redhat.com>
<-time.After(1 * time.Millisecond)
ctx, cancel := context.WithCancel(context.Background())
cancel()
rg.StopAndWait(ctx)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no guarantee that this is called after rg.Start, right? Is this intended?

If I see correctly it doesn't really matter which one is called first as StopAndWait calls Start internally and Start is using once? (just to confirm)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct, it doesn't really matter because they can both run at the same time, the waitgroup triggers. It's a best effort to try to reproduce the failure consistently, but not a guaranteed one. Although on my mac, it did trigger the race pretty consistently

@sbueringer
Copy link
Member

/lgtm

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

LGTM label has been added.

Git tree hash: 4981ed4ab135ad5f4474ff1eb6d05fc88508aedb

@k8s-ci-robot k8s-ci-robot merged commit 76d3d08 into kubernetes-sigs:main Apr 5, 2024
9 checks passed
@pmalek
Copy link

pmalek commented Apr 5, 2024

Will we get this cherry picked to release-0.17?

@sbueringer
Copy link
Member

/cherry-pick release-0.17

@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #2761

In response to this:

/cherry-pick release-0.17

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/test-infra repository.

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic in runnableGroup's Add and StopAndWait due to a data race
5 participants