question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rework "serverless rollback" support

See original GitHub issue

This is a Feature Proposal

Description

A while back we’ve introduce rollback support for serverless deployments with the help of the serverless deploy list and serverless rollback --timestamp commands.

This supports enables a way to take a look at all the deployment artifacts which are stored in the deployment bucket (with the help of serverless deploy list) and then rollback to a specific deployment based on the timestamp of the deployment (with the help of the serverless rollback --timestamp command).

While this is a good starting point it is worthwhile to re-think the whole behavior and functionality and add support for more feature rich deployment rollbacks.

This issue discusses potential improvements and current issues we should fix in an upcoming update.

Current issues:

  • It’s currently not visible which version of the service is currently deployed when running serverless deploy list
  • Rollbacks can’t be automated due to hard to parse CLI output (see here for more info).
  • Rollback doesn’t re-upload the files which will break the “Skip if files not changed” functionality (because it always compares to the most recent deployment)
  • Picking a version to rollback to based on the timestamp is not a great DX

Feature wishlist:

/cc @brianneisler @eahefnawy

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
jscattergoodcommented, Oct 31, 2017

We implemented the scripted approach to perform an automatic rollback using Jenkins, but found that serverless deploy list also includes the broken deployment and there isn’t a command to remove the broken deployment. So without a reference to the timestamp that’s actually deployed, we can’t reliably determine which timestamp to rollback to if there is another failed deployment.

It may be simple enough keep a file containing the timestamp of each deployment and the bucket that was deployed. A new command serverless deploy history would retrieve this info. The last entry would be the currently deployed timestamp.

Any thoughts?

3reactions
goncalonevescommented, Jul 27, 2017

deploy list and rollback probably are the most important Serverless commands after deploy.

My idea is, adding a Serverless meta data information file to S3 deployments that could provide more info in the deploy list command such as:

  • Serverless version
  • Provider
  • Region
  • Stage
  • Function versions
  • Custom key/value (set in serverless.yml)
  • Copy of the entire serverless.yml (?)

At deploy time this file could get custom data from serverless.yml if the developer wants to associate specific tags and key/value to a specific deployment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Serverless Rollback CLI Command
Rollback a service to a specific deployment. ... serverless rollback --timestamp timestamp ... Serverless: Checking Stack update progress.
Read more >
How to handle service dependencies when rolling back a ...
In this post we'll look at the rollback strategy you should use in your CI/CD pipeline for monorepo Serverless Framework apps.
Read more >
Automate Rollback of Serverless app with AWS ... - AntStack
Automate rollback with the help of Codedeploy and Lambda alias for our functions and deploy using SLS Framework.
Read more >
Automate Rollback of Serverless app with AWS CodeDeploy ...
This webinar gives a brief walkthrough of how we can leverage AWS Codedeploy and AWS Lambda version to deploy our functions in a...
Read more >
Top 10 Serverless Deployment Errors (and How to Fix Them)
Select the resource(s) that failed and click Continue update rollback. Once your stack has successfully deleted or rolled back, you can deploy ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found