-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[ServiceBus] Deduplicate parse_connection_string functions #14203
Comments
Hey @KieranBrantnerMagee; currently looking at this! If I think it's above my head I'll post again here. @YijunXieMS if you have something on the history of the distinction, feel free to post here! |
Still doing some reading and researching @YijunXieMS I did some pruning of the doc-strings and visual diffing to try and see the core differences here. Service Bus Client variant
Service Bus Administration Client variant def from_connection_string( cls, conn_str: str, **kwargs: Any) -> "ServiceBusAdministrationClient": endpoint, ###host in ServiceBusClient shared_access_key_name, ###policy in ServiceBusClient shared_access_key, ###key in ServiceBusClient** _ ###what looks to be a throwaway of the entity_path = parse_conn_str(conn_str) if "//" in endpoint: endpoint = endpoint[endpoint.index("//")+2:] return cls( endpoint, ###Notable lack of an entity name ServiceBusSharedKeyCredential(shared_access_key_name, shared_access_key), **kwargs) the biggest diff between the two looks to be the lack of usage of the entity_path (returned var 4) from parse_conn_str in the |
@KieranBrantnerMagee @bradleydamato Anyways, I don't think there is anything that prevents the unification of the two parse_conn_str. |
@bradleydamato right, the ServiceBusAdministrationClient doesn't care entity path. |
@YijunXieMS @KieranBrantnerMagee do y'all care if I unify, edit the imports, test, and then submit a PR? |
:) Go right ahead. I will be candid that we're getting a release out the door this friday/monday so my responses may be slightly async until that's locked, but always appreciate the help and would be glad to see this in. |
@KieranBrantnerMagee @YijunXieMS PR is here #14228 |
Hey @KieranBrantnerMagee @YijunXieMS, did the release go out yet? |
@bradleydamato , thanks for your contribution! |
Is your feature request related to a problem? Please describe.
from_connection_string is a core component of our APIs, both the ServiceBusClient and ServiceBusAdministrationClient. However, we currently have two distinct implementations, which while very similar are not quite aligned.
(see breadcrumb here)
Describe the solution you'd like
Understand the difference between the two, (Sync with @YijunXieMS if needed for history on why the management client is distinct, if any specific impetus went into that) and unify.
Describe alternatives you've considered
The only real alternative here is keeping them separate. If something is discovered in this process that indicates they should not be unified, am open to that, but would be very curious.
The text was updated successfully, but these errors were encountered: