Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollback and Prune previous versions #316

Open
2 tasks
zaus opened this issue May 6, 2024 · 3 comments
Open
2 tasks

Rollback and Prune previous versions #316

zaus opened this issue May 6, 2024 · 3 comments
Labels
feature-request A feature should be added or improved. l Effort estimation: large module/cli-ext p3 This is a minor priority issue queued

Comments

@zaus
Copy link

zaus commented May 6, 2024

Describe the feature

This may be more a pertinent to using SAM template's AutoPublishAlias or SemanticVersion rather than dotnet CLI, but deployment creates several artifacts in the S3 deployment bucket and never removes them. It's not clear how to get back to a previous version (either via CLI or in Console, as no changeset history is listed?), and I've only seen suggestions for manually cleaning up old stuff or awkward lifecycle policies or installing random 1stparty or 3rdparty plugins to do it for you.

The Serverless Framework's prune plugin handles this for the Lambda versioning, and I think it already cleans up old deployment artifacts?

Use Case

  • Clearing old micro-version/minor changes from test attempts
  • Reverting deployment with breaking change

Proposed Solution

Specifying a major/minor version number in template and remembering to update it when you want an explicit version, or deploying with an --autoversion flag; either should save separate changesets (is that how you're supposed to do it with Cloudformation Stacks?). Then:

dotnet lambda rollback-stack --v <EXACT_VERSION_NUMBER>

or

dotnet lambda rollback-stack --v "-<number of versions back"

or

dotnet lambda rollback-stack # just to previous version

To get back to the indicated version.

Also, specifying something like --retainVersions 5 to keep the last 5 deployments for rollback.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Targeted .NET platform

Any

CLI extension version

Package Id Version Commands

amazon.lambda.testtool-3.1 0.10.0 dotnet-lambda-test-tool-3.1
amazon.lambda.tools 5.10.4 dotnet-lambda
dotnet-xscgen 2.0.662 xscgen

Environment details (OS name and version, etc.)

Windows

@zaus zaus added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 6, 2024
@zaus
Copy link
Author

zaus commented May 6, 2024

I'll also just settle for guidance if this is something that can be accomplished "natively"

@ashishdhingra
Copy link
Contributor

Unsure if this is something that is available in .NET CLI Extensions tooling. Needs review with the team.

@ashishdhingra ashishdhingra added needs-review and removed needs-triage This issue or PR still needs to be triaged. labels May 7, 2024
@zaus
Copy link
Author

zaus commented May 7, 2024

I guess I shouldn't keep my hopes up if this is so old... aws/aws-sam-cli#1654

@ashishdhingra ashishdhingra added l Effort estimation: large p3 This is a minor priority issue queued and removed needs-review labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. l Effort estimation: large module/cli-ext p3 This is a minor priority issue queued
Projects
None yet
Development

No branches or pull requests

2 participants