BlobsTranscriptStore blobkey not persisting '/' for virtual directory
See original GitHub issueVersions
What package version of the SDK are you using. 4.15.0
What nodejs version are you using 14
Describe the bug
Trying to use the blobsTranscriptStore to record transcript. From the code, expecting the blob created for activity in Azure Storage to follow the pattern of container/{channelId]/{conversationId}/{Timestamp.ticks}-{activity.id}.json
But instead the blog key ended up with the ‘/’ also URIencoded so the blob name in Azure blob ended up to be container%2F{channelId}%2F{conversationId}%2F{Timestamp.ticks}-{activid.id}.json
. Which makes it not compatible with the virtual directory feature of the Azure Blob with the actual character ‘/’ in the key.
It looks like it is because the way sanitizeBlobKey
is implemented, which also sanitized the ‘/’ character.
To Reproduce
Steps to reproduce the behavior in a adaptive dialog bot with bot composer.
- Configure ‘appsettings.json’
- set ‘runtimeSettings::features::traceTranscript’ to ‘true’
- set ‘runtimeSettings::features::blobTranscript’ with ‘connectionString’ and ‘containerName’
- Interact with the bot
- Check the transcript created in Azure blob container
Expected behavior
The blob created to have a key with actual ‘/’ in the name rather than sanitized with %2F
Screenshots
Blob key with %2F generated. Expect to be real ‘/’ such that it becomes “virtual directory” in storage explorer.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (8 by maintainers)
@ramfattah yes it does, the
escape
function seems to do something similar. This blobsStorage is used by the bot state storage.https://github.com/microsoft/botbuilder-js/blob/98b1499456b28662f9b7d7c37ee6c0841f87fde5/libraries/botbuilder-azure/src/blobStorage.ts#L317
Same issue as the transcripts. When using BlobsStorage for bot state, the blob don’t have / in the key.
@Sprinkle,
Sure, that would be great, feel free to mention me in that new issue and I’ll try to assign it to myself and track it.
Thank you so much for your contribution to Bot Framework.