-
Notifications
You must be signed in to change notification settings - Fork 168
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
apidir fallback resolution; bluepages tweaks; hepa apidir support #986
base: main
Are you sure you want to change the base?
Conversation
motivation is to not have client request cancellation interrupt the resolution-and-cache process
@@ -136,6 +141,14 @@ func (dir *APIDirectory) ResolveDIDRaw(ctx context.Context, did syntax.DID) (jso | |||
if err != nil { | |||
didResolution.WithLabelValues("apidir", "error").Inc() | |||
didResolutionDuration.WithLabelValues("apidir", "error").Observe(time.Since(start).Seconds()) | |||
if dir.Fallback != 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.
this and ResolveHandle should check what kind of error like Lookup* ?
maybe make a helper for 'is api service error' ?
ctx := c.Request().Context() | ||
|
||
hdl, err := syntax.ParseHandle(c.QueryParam("handle")) | ||
ctx, cancel := context.WithTimeout(context.Background(), srv.requestTimeout) |
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.
this timeout around the whole action of the API handler is probably fine, but it makes me think that the timeout I'd really want is on the underlying client making outbound requests
No description provided.