microsoft / botbuilder-dotnet

Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
https://github.com/Microsoft/botframework
MIT License
878 stars 484 forks source link

TeamsInfo GetTeamChannelsAsync, GetTeamDetailsAsync don't pass along the cancellation token #6446

Closed aosolis closed 2 years ago

aosolis commented 2 years ago

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

4.17.1

Describe the bug

We noticed that TeamsInfo.FetchChannelList and FetchTeamDetails aren't passing along the cancellation token.

Compare https://github.com/microsoft/botbuilder-dotnet/blob/8835190558e2efe38003535c95b58e028a29c202/libraries/Microsoft.Bot.Connector/Teams/TeamsOperations.cs#L100 to https://github.com/microsoft/botbuilder-dotnet/blob/3443034a40c5a774907fd448bb8d2110d9337a03/libraries/Microsoft.Bot.Connector/Conversations.cs#L2027

In the first version, the cancellationToken is not passed along, and so the operation is not canceled when the cancellation token is signaled.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Give a clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

johnataylor commented 2 years ago

This seems like a simple fix. We don't need and end to end repro for this. The correct code is to pass through the cancellation token.