-
Notifications
You must be signed in to change notification settings - Fork 37
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(studio-be): fix cache invalidation being discarded by flow service #229
Conversation
@allardy I need more details on why we have to handle this when we call if (process.BPFS_STORAGE === 'disk') {
key = key.replace('::data/', '::')
} We might want to move this logic inside a util function so that all services listening to invalidation can select the files they want to handle accordingly |
DEV-2203 (BUG) Overriding a bot on a stage breaks DialogEngine and fails to update content-elements (botpress/botpress botpress/v12#1581)
Describe the bug
May be related to this issue. To Reproduce
Expected behavior Environment (please complete the following information):
Additional context |
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.
LGTM
This PR should fix an issue where overriding a bot with the same id (or uploading a bot with an id that already existed) would result in having outdated flow content.
Here is the reason why we should check for matches with and without the prefix
/data
: botpress/studio/#2This endpoint (
/invalidateFile
) is called whenever there is an invalidation in Botpress. Since we remove thedata/
part from the key when running using SQLite, the flow-service would discard the cache invalidation resulting in outdated flow data being used.I also updated the config loader and hint service to make sure that they watch for both keys containing or not the
data/
part.Closes botpress/v12#1581
Closes DEV-2203
Testing
on_stage_request
hook using this code:You can then repeat these steps to see that the issue is not resolved.