-
Notifications
You must be signed in to change notification settings - Fork 663
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
MG-2235 - Check gRPC Service is Healthy During Setup #2245
Conversation
auth/api/grpc/endpoint_test.go
Outdated
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.
LGTM
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.
LGTM
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.
LGTM
pkg/auth/client.go
Outdated
) | ||
|
||
var errHealthCheckFailed = errors.New("health check failed") |
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.
You can rename this error to errSvcNotServing = errors.New("service is not serving")
and use it directly (not as a wrapper) in cases the service is not in the right state.
3c1ade4
a0f1775
to
4852b6b
Compare
When connecting to the grpc server ensure the server is healthy before returning AuthClient No breaking changes. It only break the SetupAuth and SetupAuthz clients Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: Rodney Osodo 28790446+rodneyosodo@users.noreply.github.com
What type of PR is this?
This is a bug fix because it fixes the following issue: #2235
What does this do?
When connecting to the grpc server ensure the server is healthy before returning AuthClient during setup
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
Yes, I have modified testes and tested manually
The logs below are for test where I simulated the things auth server is unhealthy
Logs
Did you document any new/modified feature?
I have updated go docs for the setup function
Notes