botpress / studio

The studio is the main interface you'll use to build and edit your chatbot.
https://botpress.com/docs/quickstart#conversation-studio
36 stars 38 forks source link

feature(studio-ui): deploy chatbot button #299

Closed Raid55 closed 2 years ago

Raid55 commented 2 years ago

1 Click deploy on studio.

Needs Training view: 2022-02-18 10 52 50

Deploy Bot View: 2022-02-18 10 53 13

linear[bot] commented 2 years ago
DEV-2032 Deploy Chatbot Button

A button that shows up next to the emulator button (top right of studio). If configured, when pushed it will deploy bot to cloud. Info: 1. hide bot and display a spinner + "deploying chatbot" when push starts. 2. export bot archive 3. decode runtime url from api key (ask @spg if that's doable) 4. push archive to runtime over http (ask what if we want to override a bot ? is it same endpoint ? if not we might want to fetch the bot from the ID 1st how do we do that ? @spg @thomas.caissie ) 5. on success display a success toast message with a link to configure the chatbot messaging channels on the controller, on error, display an error toast Behaviors: * Disabled if "not a cloud ready bot" ==> tooltip "Create a cloud-ready to enable this option" * Disabled option if api key not configured ==> tooltip "Botpress cloud api key isn't configured"

laurentlp commented 2 years ago

Not sure why yet but I get this error when trying to deploy my bot:

{"statusCode":400,"type":"RangeError","message":"Invalid status code: undefined","details":"","docs":"https://botpress.com/docs","showStackInDev":true,"stack":"RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined\n    at ServerResponse.writeHead (_http_server.js:248:11)\n    at ServerResponse.writeHead (/home/laurentlp/code/botpress/studio/node_modules/on-headers/index.js:44:26)\n    at ServerResponse.writeHead (/home/laurentlp/code/botpress/studio/node_modules/on-headers/index.js:44:26)\n    at ServerResponse._implicitHeader (_http_server.js:239:8)\n    at ServerResponse.end (/home/laurentlp/code/botpress/studio/node_modules/compression/index.js:103:14)\n    at ServerResponse.send (/home/laurentlp/code/botpress/studio/node_modules/express/lib/response.js:221:10)\n    at /home/laurentlp/code/botpress/studio/packages/studio-be/out/studio/cloud/cloud-router.js:97:32\n    at runNextTicks (internal/process/task_queues.js:62:5)\n    at processImmediate (internal/timers.js:429:9)\n    at process.topLevelDomainCallback (domain.js:137:15)","full":"Invalid status code: undefined"}
Raid55 commented 2 years ago

Bot should be working now and deploying properly.

Raid55 commented 2 years ago

Everything that is collapsed/outdated has been addressed in the latest push.