Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

fix: Use IStorage for skill's id factory#3137

Merged
luhan2017 merged 8 commits intomasterfrom
qika/fix3133
May 29, 2020
Merged

fix: Use IStorage for skill's id factory#3137
luhan2017 merged 8 commits intomasterfrom
qika/fix3133

Conversation

@zidaneymar
Copy link
Contributor

Description

use IStorage rather than concurrent dictionary for id factory in Composer

Task Item

fixes #3133

Screenshots

gabog
gabog previously approved these changes May 21, 2020
Copy link
Contributor

@gabog gabog left a comment

Choose a reason for hiding this comment

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

Check my comment and see if it makes sense.
Also, you may want to write a unit test for this. You can use MemoryStorage for it.

@zidaneymar
Copy link
Contributor Author

Check my comment and see if it makes sense.
Also, you may want to write a unit test for this. You can use MemoryStorage for it.

I have added the unit tests, referring to the SkillHandlerTests in botbuilder-dotnet


// Create the storage key based on the SkillConversationIdFactoryOptions.
var conversationReference = options.Activity.GetConversationReference();
var skillConversationId = $"{options.FromBotId}-{options.BotFrameworkSkill.AppId}-{conversationReference.Conversation.Id}-{conversationReference.ChannelId}-skillconvo";
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this "skillconvo" mean?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is just an arbitrary string, so you know that is a skill conversation ID when debugging, it not required at all, is up to the dev what the ID looks like.

@luhan2017 luhan2017 merged commit 4506c4d into master May 29, 2020
@luhan2017 luhan2017 deleted the qika/fix3133 branch May 29, 2020 08:40
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* use IStorage for id factory

* fix conversationId

* add ConversationIdFactory unit tests

* renaming tests

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Co-authored-by: Lu Han <32191031+luhan2017@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runtime should use IStorage for SkillConversationIdFactory

4 participants