Skip to content

Move delete_user and list_users to pipeline architecture #346

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

Merged
merged 6 commits into from
Oct 12, 2021

Conversation

JoshGendein
Copy link
Member

Shared UserResponse to replace CreateUserResponse, GetUserResponse, and ReplaceUserResponse
delete_user to pipeline architecture
list_users to pipeline architecture using stream implementation

Continuing #290

Copy link
Contributor

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! We'll want to actually run this code to make sure it still works. In the meantime, I left a few comments on things we might want to improve.

ctx: Context,
options: ListUsersOptions,
) -> impl Stream<Item = Result<ListUsersResponse, crate::Error>> + '_ {
macro_rules! r#try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to move most of this logic to a shared place once this and #340 lands.

@@ -135,21 +158,6 @@ impl UserClient {
PermissionClient::new(self, permission_name)
}

pub(crate) fn prepare_request_with_user_name(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we actually want to keep this and just make sure that replace_user is also using it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I pushed a change that adds it back and uses it in Get, Replace, and Delete

@yoshuawuyts
Copy link
Contributor

@JoshGendein can we close this PR now that #349 has been merged?

@JoshGendein
Copy link
Member Author

@JoshGendein can we close this PR now that #349 has been merged?

I was going to wait for #340 to be merged in. Ryan mentioned we could move some of the code to a shared place.

@yoshuawuyts
Copy link
Contributor

yoshuawuyts commented Aug 26, 2021

ohh, my bad! - When I suggested we "close this PR", I misread which APIs this was about and thought it was a duplicate 😅

I think this PR should probably be good to merge now! We're tracking "shared abstractions for streaming responses" in #341, so we can work on creating that once both this PR and #340 have been merged. It's usually easier to find a shared abstraction once there's multiple things that need it anyway (:

tldr: once we resolve the merge conflict, let's merge it?

@MindFlavor
Copy link
Contributor

tldr: once we resolve the merge conflict, let's merge it?

We should probably merge #339 first because without it we cannot test if these changes still work against Azure.

@JoshGendein
Copy link
Member Author

tldr: once we resolve the merge conflict, let's merge it?

We should probably merge #339 first because without it we cannot test if these changes still work against Azure.

@yoshuawuyts @MindFlavor Ok, I fixed the merge conflict so this is ready to be completed. Should this still wait for the auth token PR to be merged?

@rylev
Copy link
Contributor

rylev commented Oct 4, 2021

@JoshGendein Sorry for not merging this sooner. Can you rebase again, and then we can merge.

@MindFlavor MindFlavor merged commit 2498864 into Azure:main Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants