Conversation
libs/wire-api/src/Wire/API/User.hs
Outdated
5d1534c to
026897b
Compare
026897b to
84459b1
Compare
84459b1 to
7d68e62
Compare
7d68e62 to
df5ce4f
Compare
There was a problem hiding this comment.
In fact I've been thinking about turning that off globally. I don't think this hint is ever incredibly helpful, it just ranges between harmless and obnoxious-yet-harmless.
There was a problem hiding this comment.
Yeah, it's certainly contentious.
df5ce4f to
13c0351
Compare
mdimjasevic
left a comment
There was a problem hiding this comment.
There are several things I would change and you can find comments inlined.
I wasn't able to grasp the logic behind your proposed change so it would be great if you can walk me through the PR in a call.
There was a problem hiding this comment.
What's the need for making the list explicit?
There was a problem hiding this comment.
Oh I think this was HLS being too proactive.
There was a problem hiding this comment.
You haven't addressed this TODO note.
libs/wire-api/src/Wire/API/User.hs
Outdated
There was a problem hiding this comment.
If possible, I'd away the generic Text type here and use/create a type specific to external IDs.
There was a problem hiding this comment.
Same. Since I just moved this code from somewhere else, I didn't want to make this PR even larger than it already was by refactoring this + all the call sites.
libs/wire-api/src/Wire/API/User.hs
Outdated
There was a problem hiding this comment.
I believe there's an easier way to specify an endpoint, i.e., without having to write AsUnion instances. Perhaps if you look at the Galley API routes module, you should find inspiration there.
Also, to me it doesn't sound like these HTTP-specific types belong to the module.
There was a problem hiding this comment.
Let's see about improving that in our call later 👍
libs/wire-api/src/Wire/API/User.hs
Outdated
There was a problem hiding this comment.
Why have left and right for errors? It's not wrong, but it looks unusual. Errors are typically kept on the left, and the right side is kept for happy case values.
There was a problem hiding this comment.
- This is only used to make working with schema profunctor easier.
- I didn't want to create a custom Either isomorphism, on top of the one already created to handle these two different error types, just to not re-use Either, when… either already exists and has the upside of already being supported in schema profunctor.
services/brig/src/Brig/API/User.hs
Outdated
services/spar/src/Spar/Scim/User.hs
Outdated
There was a problem hiding this comment.
An unhandled TODO note.
services/brig/src/Brig/API/User.hs
Outdated
mdimjasevic
left a comment
There was a problem hiding this comment.
Just take care of remaining TODOs and that's it! Thanks for the walk-through during the call!
checked that all review comments have been taken care of.
dbaa8e4 to
c69989e
Compare
This should prevent issues when creating a user fails midway, and we end up with dangling data that needs to be manually deleted in order to enable user creation.
As part of this effort, we're taking steps to break down
createUserinto multiple, use-case specific functions, which take more specific arguments to what it actually needs.I've left a few checkmarks below unchecked, but I'll be getting those done soon, it shouldn't affect review.
Special attention should be paid to the new
NewUserSparrecord and its usage as well as a change in thecreateSAMLfunctions. Also, this adds a new internal endpoint,POST i/users/spar, to disambiguate from the (hopefully soon to be legacy)i/users.Checklist
changelog.d.