Skip to content
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(core): partial fix for bp push #5652

Merged
merged 1 commit into from
Nov 1, 2021
Merged

fix(core): partial fix for bp push #5652

merged 1 commit into from
Nov 1, 2021

Conversation

allardy
Copy link
Member

@allardy allardy commented Nov 1, 2021

Description

This is a temporary PR which will fix the related issue but will still need refining / a proper fix. Basically, when we use bp push, we overwrite the remote files with the local ones, then we unmount remote bots, and mount the new bots.

The problem here is that the unmount operation was not entirely completed before it tries to mount it, I suspect there's a conflict somewhere between the studio and the core. A workaround for the associated issue is to run the bp push command twice. This fix will remove that requirement.

Since we plan to separate the studio from the core really soon, I don't think much more time should be put here

Fixes #https://linear.app/botpress/issue/DEV-1966/[bug]-builtin-text-not-found-after-bp-push-botpressborpress-5643

Fixes DEV-1966

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

@ptrckbp ptrckbp self-requested a review November 1, 2021 23:39
Copy link
Contributor

@ptrckbp ptrckbp left a comment

Choose a reason for hiding this comment

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

I can't comment to side-effects, because it will take too much time, but code wise, there's no issue. It builds, and it runs! Maybe good enough for a bug-fixing marathon.

@allardy allardy merged commit b24bc3f into x-meta Nov 1, 2021
@franklevasseur franklevasseur mentioned this pull request Nov 3, 2021
This was referenced Dec 2, 2021
@allardy allardy deleted the ya-fix-bp-push branch December 7, 2021 05:27
@linear
Copy link

linear bot commented Jan 14, 2022

DEV-1966 [BUG] "!builtin_text-" not found after bp push (botpress/borpress botpress/v12#1535)

Describe the bug
After having run a bp push my chatbot does not reply anymore through the Webchat.

I get a response from the Converse API, but without any replies from the chatbot.

There also is an error in the logs

10/26/2021 09:15:22.150 DialogEngine Error processing 'say #!builtin_text-KPnO5A'                                                                                                                                                          
                             Err: Content element "!builtin_text-KPnO5A" not found                                                                                                                                                          
                             BotId: mybot                                                                                                                                                                                                
                             Flow: subflow/myflow.flow.json                                                                                                                                                                                
                             Node: entry [Error, Content element "!builtin_text-KPnO5A" not found]                                                                                                                                          
 STACK TRACE                                                                                                                                                                                                                                
 Error: Content element "!builtin_text-KPnO5A" not found                                                                                                                                                                                    
     at CMSService.renderElement (/snapshot/botpress/packages/bp/dist/core/cms/cms-service.js)                                                                                                                                              
     at async ActionStrategy.invokeOutputProcessor (/snapshot/botpress/packages/bp/dist/core/dialog/instruction/strategy.js)                                                                                                                
     at async DialogEngine.processEvent (/snapshot/botpress/packages/bp/dist/core/dialog/dialog-engine.js)                                                                                                                                  
     at async DecisionEngine.processEvent (/snapshot/botpress/packages/bp/dist/core/dialog/decision-engine.js)                                                                                                                              
     at async EventEngine.onAfterIncomingMiddleware (/snapshot/botpress/packages/bp/dist/core/app/botpress.js)                                                                                                                              
     at async /snapshot/botpress/packages/bp/dist/core/events/event-engine.js

To Reproduce
Steps to reproduce the behaviour:

  1. Update Botpress in Dev (from 12.21.1 to 12.26.6)
  2. Update Botpress in Prod (from 12.21.1 to 12.26.6)
  3. bp pull from Dev
  4. bp push in Prod
  5. Chat with a chatbot

Expected behavior
The bp push should work without a botpress server restart as it did in the past.

Screenshots
N/A

Environment (please complete the following information):

  • BP Version 12.21.1 to 12.26.6

Additional context
We are trying to update botpress in a blue/green fashion, and the bp push is causing the botpress instances to fail on content elements for existing and new conversations. This effectively renders the instances unusable until we restart them.

I'd also add that:

  1. The content elements are still present and visible in the Studio
  2. The content elements are still found in the database
  3. Problem seems present in 12.24 as well
  4. A restart of the bp server "solves" the issue

botpress/borpress botpress/v12#1535 by @ hacheybj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants