rtc-diagnostics-react-app icon indicating copy to clipboard operation
rtc-diagnostics-react-app copied to clipboard

deploy.js support Serverless redeployment

Open alexcchan opened this issue 5 years ago • 2 comments

What is the feature that you would like to see in the SDK? Please describe.

deploy.js only supports one-time initial deployment. It would nice if it also supported redeployment of updated code.

Is your feature request related to a problem? Please describe.

Running npm run serverless:deploy again creates an extra API key and fails with this Serverless REST API error:

(node:5585) UnhandledPromiseRejectionWarning: conflicting-servicename: Service with name "rtc-diagnostics" already exists with SID "ZS...".

Describe alternatives you've considered

It looks like the intention is for the app to be deleted before being deployed again. (Add to README.md?)

Additional context

As a point of comparison:

https://github.com/twilio/twilio-video-app-react#deploy-the-app-to-twilio

alexcchan avatar Aug 25 '20 20:08 alexcchan

Noticed the same thing myself - the resolution here may just be as simple as updating the README file to suggest running npm run serverless:remove if you need to redeploy. There is a remove.js script in the same directory as the deploy script (npm run serverless:deploy/remove commands are just an alias for npm run build && node serverless/scripts/deploy.js.

The remove script removes the service, the TwiML app and the newly generated key so it cleans house better than just removing the service by hand or via twilio-cli.

taylorwilsdon avatar Sep 17 '20 20:09 taylorwilsdon

Adding internal tracker https://issues.corp.twilio.com/browse/AHOYAPPS-959

charliesantos avatar Jan 05 '21 19:01 charliesantos