-
Notifications
You must be signed in to change notification settings - Fork 325
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
Refactor CSV export #4293
Refactor CSV export #4293
Conversation
19c4ac0
to
81fcc17
Compare
81fcc17
to
5c4b3e5
Compare
This is not needed anymore since the stern endpoint to get user activity has been removed.
39f74ce
to
963b33b
Compare
services/brig/src/Brig/Data/User.hs
Outdated
@@ -374,6 +374,7 @@ lookupName u = | |||
fmap runIdentity | |||
<$> retry x1 (query1 nameSelect (params LocalQuorum (Identity u))) | |||
|
|||
-- TODO: remove this |
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.
Something still to be done?
case mFromInvitation of | ||
Just ts -> pure $ Just ts | ||
Nothing -> do | ||
-- TODO: make this a single user query |
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.
Is this still to be done or you've changed your mind?
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.
Please address or drop the two TODOs. Otherwise this looks good to me.
384fde2
to
809a623
Compare
This adds
last_active
andstatus
columns to the team CSV export. It also includes a refactoring of the export handler. I manually tested performance of the new handler, and for 500 users it's very similar to before despite the extra query. For larger teams it should be comparatively faster.We have had a discussion on whether or not to make a new version of this endpoint. Adding columns at the end of the previous CSV format is quite unlikely to break scripts, so in the end I decided not to make a new version and keep things simple. In the future, we might consider further improving the export functionality by making it asynchronous for large teams, and possibly making columns user-selectable.
https://wearezeta.atlassian.net/browse/WPB-11368
Checklist
changelog.d