serverless-aws-alias icon indicating copy to clipboard operation
serverless-aws-alias copied to clipboard

Add alias support to "rollback" command

Open HyperBrain opened this issue 7 years ago • 1 comments

The rollback command should support alias rollbacks.

The semantics here is quite difficult, because multiple aliases could be deployed currently. There are a variety of different cases that can appear:

  1. Rollback everything (all aliases) to the selected timestamp To enable this functionality, the plugin has to store the status (CF templates) of every alias on every deploy to S3. Then these files can be used to reconstruct the whole stage to the state as it was.

  2. Rollback only one alias to the selected timestamp This is more difficult as resources might have been changed over time and it could be possible that the old alias state does not match the state of the other aliases (most importantly the master alias) anymore. In the worst case a rollback of a single alias is only possible through to a timestamp that is newer than the requested one.

I would favor 1 as the initial implementation and discuss 2 further to find the best solution for that case.

HyperBrain avatar Mar 06 '17 18:03 HyperBrain

There is currently a discussion going on in serverless, to extend the standard rollback functionality. The alias plugin should adapt whatever is decided there to make it work with aliases. https://github.com/serverless/serverless/issues/3894

HyperBrain avatar Jul 04 '17 14:07 HyperBrain