- Notifications
You must be signed in to change notification settings - Fork926
chore(coderd/coderdtest): wait for provisioner daemons to be connected#15936
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
coderd/coderdtest/coderdtest.go Outdated
func AwaitProvisionerDaemonsConnected(t testing.TB, api *coderd.API) { | ||
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort) | ||
defer cancel() | ||
for { |
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.
Instead of this polling loop with potentially noisy logs, what if we made a slight addition to theprovisionerd.Server
such that it closes or sends on a buffered channel when it connects for the first time. This is how the tailnet dialer works.
Then we could select on that channel (vsctx.Done()
) rather than polling.
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.
I tried this out, except at the provisionerd level itself. LMK if that suits, or I can circle back and do it in the provisionerd server as you suggested.
9e9a5fd
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Fixescoder/internal#260