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

refactor: [#4759] Migrate off @azure/core-http #4834

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sw-joelmut
Copy link
Collaborator

Fixes #4759

Description

This PR migrates the deprecated @azure/core-http library to the newer ones like core-rest-pipeline, core-client, etc.
Multiple functionalities from the new libraries have been converted to be closely related to core-http to avoid breaking changes as close it can be, for that we mostly used the core-http-compat library and some other utility code we have created.

Specific Changes

  • core-http related code have been moved to botbuilder-stdlib to maintain the migration compatibility across BotBuilder libraries.
  • Created ServiceClientContext class to maintain compatibility across ConnectorClient, LuisRuntimeClient, TeamsConnectorClient, etc.
    • This new class contains all the functionality to map core-http functionality to core-rest-pipeline, to make requests and manage policies.
  • Updated imports to use botbuilder-stdlib instead of core-http.
  • Removed core-http package, and installed the new ones.

Testing

The following image shows a few of the samples working with the new changes.
image

@sw-joelmut sw-joelmut requested a review from a team as a code owner December 20, 2024 17:35
@coveralls
Copy link

coveralls commented Dec 20, 2024

Pull Request Test Coverage Report for Build 12435860219

Details

  • 129 of 148 (87.16%) changed or added relevant lines in 22 files are covered.
  • 6 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.06%) to 84.57%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/botframework-connector/src/auth/botFrameworkClientImpl.ts 2 3 66.67%
libraries/botbuilder-stdlib/src/azureCoreHttpCompat/serviceClientContext.ts 57 75 76.0%
Files with Coverage Reduction New Missed Lines %
libraries/botbuilder-ai/src/luisRuntimeClientContext.ts 1 60.0%
libraries/botframework-streaming/src/webSocket/webSocketServer.ts 1 97.22%
libraries/botbuilder/src/streaming/streamingHttpClient.ts 4 63.16%
Totals Coverage Status
Change from base Build 12259066809: -0.06%
Covered Lines: 20529
Relevant Lines: 23117

💛 - Coveralls

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.

Migrate off @azure/core-http
2 participants