-
Notifications
You must be signed in to change notification settings - Fork 276
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
Add trace activity-buffering logic when DeliveryMode is "expectReplies" #2738
Conversation
Pull Request Test Coverage Report for Build 170414
💛 - Coveralls |
@gabog, right now I strongly believe we should add expectReplies bufferedReplies-parsing logic at the BotFrameworkAdapter level. We should also setup the Adapter to have a hook for filtering out certain activities in bufferedReplies and configure tracing to be an explicit opt-in. |
@stevengum do we intend to land this change? I see it's linked to an open R11 issue. |
Yes, this will probably land early next week. I'll sync with @gabog and @tracyboehrer to verify resource availability for porting it to .NET and Python |
* fix merge conflicts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems okay to me, though I don't think I fully understand the potential issues you mentioned in the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny suggestion, otherwise LGTM.
Fixes #2732
FYI @alopix, @johnataylor, @EricDahlvang
Description
When DeliveryMode is
"expectReplies"
, outgoing trace activities are not routed through the TurnContext's BotAdapter. This resulted in trace activities being sent to the channel. This PR duplicates the trace activity logic in BotFrameworkAdapter.sendActivities() and places it in TurnContext.sendActivities().BotFrameworkAdapter.sendActivities():
botbuilder-js/libraries/botbuilder/src/botFrameworkAdapter.ts
Lines 979 to 981 in 015ebb7
There are a couple of ways to address issue #2732, including via BotFrameworkAdapter.processActivity() or SkillDialog/BeginSkill. This current implementation at 02aff60 is perhaps the most straightforward way of fixing it, but may have unintended consequences for channels with custom clients/3rd-party channels that do support trace activities.
Additionally, having the trace filtering logic in BotFrameworkAdapter.processActivity() means the "restriction" is at the same level (an integration library,
botbuilder
) as opposed to having the logic in a base concept library (botbuilder-core
).Specific Changes
BotFrameworkAdapter.sendActivities()
trace
activity logic inTurnContext.sendActivities()
TurnContext
changes & minor test cleanupTesting
Added unit tests