Skip to content
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

[Core AMQP] move common duplicate internal code in SB & EH back to core-amqp #12397

Closed
ramya-rao-a opened this issue Nov 9, 2020 · 5 comments
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. Event Hubs help wanted This issue is tracking work for which community contributions would be welcomed and appreciated Service Bus

Comments

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Nov 9, 2020

There is quite a bit of common code between Service Bus and Event Hubs which were previously housed in and exported from @azure/core-amqp. But most of these are internal details and need not be exposed to user allowing us to change/break the apis.

As part of v2 for @azure/core-amqp, we are moving such code to Service Bus and Event Hubs packages. This issue is to have a folder to house these changes in a single place and then referenced by Service Bus and Event Hubs packages just like how we have the keyvault-common folder.

Below are the candidates to live in this folder

  • Code around SharedKeyCredential and SharedAccessKeyCredential
  • validation of connection string when parsing
  • Default Data transformer
  • Core around EventDataBatch and ServiceBusMessageBatch
  • The utility waitForTimeoutOrAbortOrResolve
  • Sender that uses the awaitable sender, but whose send() method uses the abortSignal and timers
  • The function getRuntimeInfo()

Update as of 15th July 2021:

Based on the below discussions, we want to continue with having core-amqp as the place to share code.
Keeping this issue open to move the duplicate code i.e. the candidates mentioned above back to core-amqp

Code pointers:

  • Set up your dev env
  • Code for @azure/service-bus can be found in sdk/servicebus/service-bus
  • Code for @azure/event-hubs can be found in sdk/eventhubs/event-hubs
  • Code for @azure/core-amqp can be fond in sdk/core-core-amqp
  • Select any of the candidates for duplicate code in the Service Bus and Event Hubs packages to move them to the core-amqp package
@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 9, 2020
@ramya-rao-a ramya-rao-a added Azure.Core Client This issue points to a problem in the data-plane of the library. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Nov 9, 2020
@ramya-rao-a ramya-rao-a modified the milestones: bac, Backlog Nov 9, 2020
@chradek
Copy link
Contributor

chradek commented Jun 4, 2021

I think keeping core-amqp as a package is a better plan than treating it like keyvault-common. I see a couple issues with the keyvault-common approach:

  • code duplication in bundles, due to it being present in all packages that consume it
  • Some bundlers have issues following the browser mappings correctly using the keyvault-common approach. I ran into this when investigating react-native support. It meant maintaining additional browser mappings that needed to be updated in each package that used the -common approach rather than consolidating the mappings in the package containing the common code (e.g. core-amqp)

@ramya-rao-a
Copy link
Contributor Author

Thanks @chradek

@xirzec You had some concerns in following the model of keyvault-common. Can you post them here as well?

@xirzec
Copy link
Member

xirzec commented Jun 8, 2021

Beyond the issues that Chris mentions (size duplication and the difficulty of doing browser/node versions), there are some dev quality of life things (that can perhaps be mitigated by proper configuration):

  1. Having long, complex import paths that reach into other folders outside the source root.
  2. Because of 1, the output directory structure that TS emits reflects a huge part of the tree, which gets messier to reason about.

@ramya-rao-a
Copy link
Contributor Author

Based on the above discussions, we want to continue with having core-amqp as the place to share code.
Keeping this issue open to move the duplicate code back to core-amqp

@ramya-rao-a ramya-rao-a modified the milestones: Backlog, [2021] December Jul 15, 2021
@ramya-rao-a ramya-rao-a added the help wanted This issue is tracking work for which community contributions would be welcomed and appreciated label Jul 19, 2021
@jeremymeng jeremymeng changed the title [Core AMQP] Code between SB & EH that is common but need not be exported from core-amqp [Core AMQP] move common duplicate internal code in SB & EH back to core-amqp Apr 6, 2022
@deyaaeldeen deyaaeldeen self-assigned this Mar 30, 2023
Copy link

Hi @ramya-rao-a, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2024
@xirzec xirzec removed this from the Backlog milestone May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. Event Hubs help wanted This issue is tracking work for which community contributions would be welcomed and appreciated Service Bus
Projects
None yet
Development

No branches or pull requests

4 participants