-
Notifications
You must be signed in to change notification settings - Fork 324
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
federator: rename Brig -> Service and add galley #1570
Conversation
ac1152a
to
bf4c341
Compare
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.
Hm, interesting! We didn't catch this before, when we only use mocks... but it would be nice to be able to catch this sort of problem without an end2end test.
As https://github.com/wireapp/wire-server/blob/develop/services/brig/test/integration/Federation/End2end.hs#L236 returns a 200, if galley can't be called yet, I suppose that is because currently only a call to a remote brig is made, and #1556 isn't merged yet?
(Even though this is only a draft, changes so far look good)
Agreed, but I'm not sure how.
That's right, that test is indeed failing in #1556. |
0620cb8
to
0e7a79d
Compare
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.
Overall this looks good. The only thing I am not sure about is the implementation of interpretService
. @pcapriotti , can you tell if it needs updating?
Thanks for the review. I changed whatever |
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.
Great!
I left a tiny comment in a Galley test you added.
|
||
res :: InwardResponse <- mock @Service @IO . noLogs . Polysemy.runReader allowAllSettings $ callLocal request | ||
actualCalls <- mockServiceCallCalls @IO | ||
let expectedCall = (Galley, "/users", "\"foo\"", aValidDomain) |
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 don't understand this well, but shouldn't this be about a Galley-related endpoint?
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 guess it should. It's just a mocked request, so it doesn't matter, but I'll turn it into a galley endpoint for clarity.
Federator is currently forwarding all its requests to brig, regardless of the value of the
Component
field. This PR adds support for arbitrary internal services, renames theBrig
effect toService
to reflect its generalised function, and adds a configuration option for galley.