Closed Raid55 closed 2 years ago
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"
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"}
Bot should be working now and deploying properly.
Everything that is collapsed/outdated has been addressed in the latest push.
1 Click deploy on studio.
Needs Training view:![2022-02-18 10 52 50](https://user-images.githubusercontent.com/23468320/154736438-f626aec5-9860-4ca8-9b35-40260fae36b7.gif)
Deploy Bot View:![2022-02-18 10 53 13](https://user-images.githubusercontent.com/23468320/154736483-84aaf132-6eb9-4f65-90c5-38f8b66028c0.gif)