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

Race condition in commands using watch #1109

Closed
akerekes opened this issue Nov 11, 2020 · 0 comments · Fixed by #1113
Closed

Race condition in commands using watch #1109

akerekes opened this issue Nov 11, 2020 · 0 comments · Fixed by #1113
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@akerekes
Copy link
Contributor

Bug report

The wait.Wait.Wait() implementations create the watch they are listen to in a goroutine that can execute later than the code that emits the event the watch was intended for.

Expected behavior

The watch is created upfront, then the wait for the event is executed in a goroutine while the main thread calls the backend that will emit the expected event.

Steps to reproduce the problem

I was able reproduce this by:

  • adding 30 seconds sleep into vi/client.go's WatchRevision method before the watch is created on the backend
  • call kn revision delete --wait <rev_name>

kn version

HEAD

Knative (serving/eventing) version

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants