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

fix: [#4123][botframework-connector] upgrade and clean up dependencies #4161

Merged
merged 8 commits into from
Sep 19, 2022

Conversation

ceciliaavila
Copy link
Collaborator

Fixes #4123 #4094

Description

This PR upgrades de dependencies in botframework-connector library to use the latest version of @azure/ms-rest-js, @azure/identity, and jsonwebtoken.

Note: The consumer-tests check was updated to test against the TypeScript versions from 3.5 to 4.3.
Versions 3.3 and 3.4 were removed from the check, otherwise, azure/ms-rest-js version should be fixed in 2.0.0 to avoid failures.

Specific Changes

  • Updated botframework-connector's dependencies.
    • @azure/ms-rest-js and @azure/identity to latest version.
    • jsonwebtoken to version ^8.5.1 to match the one resolved for other projects.
    • @types/jsonwebtoken to version 8.3.5 (higher versions introduce breaking changes in jwtTokenExtractor)
  • Upgraded @azure/ms-rest-js in botbuilder and botbuilder-ai
  • Updated botFrameworkAdapter.test. unit tests to access the headers as an array due to a change between ms-rest-js and nock.
  • Updated yarn.lock with the new versions.
  • Updated run.ts to test against TypeScript versions from 3.5 to 4.3.

Testing

This image shows the unit tests passing after the upgrades.
image

@ceciliaavila ceciliaavila requested a review from a team as a code owner March 16, 2022 16:54
@coveralls
Copy link

coveralls commented Mar 16, 2022

Pull Request Test Coverage Report for Build 2197216988

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.482%

Totals Coverage Status
Change from base Build 2191296601: 0.0%
Covered Lines: 19909
Relevant Lines: 22316

💛 - Coveralls

@ceciliaavila ceciliaavila linked an issue Mar 16, 2022 that may be closed by this pull request
@@ -28,7 +28,7 @@
},
"dependencies": {
"@azure/cognitiveservices-luis-runtime": "2.0.0",
"@azure/ms-rest-js": "1.9.1",
"@azure/ms-rest-js": "^2.6.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC this is might be a breaking change due to the underlying library using fetch instead of axios. Would not upgrade this without deciding it's okay to take a breaking change./

Copy link
Member

Choose a reason for hiding this comment

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

@ceciliaavila Can we confirm if this is a breaking change and if there are alternatives?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @tracyboehrer,

We reviewed the code where this library is used and the changes that its new versions introduced and consider that they are not breaking changes for us (we are not using the interfaces and methods that were updated).

We also tested the libraries with the azure/ms-rest-js upgraded version:

  • We published the packages to a testing feed and ran the BotFramework-FunctionalTests pipelines. All tests passed (cards, proactive, authentication (single-tenant, multi-tenant, MSI), among others).
  • We tested a sample using botframework-streaming and webchat and it worked.
  • We tested the CoreBot sample connected to a LUIS app and it worked as expected.

However, as an alternative, we could leave this dependency as it was and update only azure/identity, and jsonwebtoken versions.

Please, let us know if you have any questions.

@tracyboehrer tracyboehrer merged commit d05bf77 into main Sep 19, 2022
@tracyboehrer tracyboehrer deleted the southworks/update/bf-connector-dependencies branch September 19, 2022 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[botframework-connector] upgrade and clean up dependencies Upgrade ms-rest-js to latest version (2.6.0)
4 participants