-
Notifications
You must be signed in to change notification settings - Fork 1.9k
MWI: Wait for bot identity before starting services #55610
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
0206b60
to
b0ac950
Compare
lib/tbot/service_database_tunnel.go
Outdated
select { | ||
case <-s.botIdentityReadyCh: | ||
case <-ctx.Done(): | ||
return alpnproxy.LocalProxyConfig{}, 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.
Kind of nitpick territory, but will this empty value be handled optimally downstream? From my quick read I think alpnproxy.NewLocalProxy()
will probably produce an error (due to CheckAndSetDefaults()
failing) so we might still log a confusing error instead of exiting quietly.
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.
Good catch actually! Rather than returning a nil
error, maybe we should return ctx.Err()
?
b0ac950
to
b998c1a
Compare
14ff176
to
1ceb85e
Compare
ef93354
to
d8260bf
Compare
9ac6e92
to
58ff129
Compare
58ff129
to
e298c5a
Compare
Backport #55610 to branch/v17
Builds on #55609 to wait for the internal bot identity to be ready before starting services, to avoid spamming the logs with errors.