aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Adds support to delete old versions when successful deployment

Open driverpt opened this issue 1 year ago • 15 comments

Which issue(s) does this change fix?

#7398

Why is this change necessary?

Because there's a limit on how many versions a Lambda has.

How does it address the issue?

Automatically deletes old version. Very useful when on SnapStart

What side effects does this change have?

None, it's disabled by default

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • [ ] Add input/output type hints to new functions/methods
  • [ ] Write design document if needed (Do I need to write a design document?)
  • [x] Write/update unit tests
  • [x] Write/update integration tests
  • [x] Write/update functional tests if needed
  • [x] make pr passes
  • [x] make update-reproducible-reqs if dependencies were changed
  • [ ] Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

driverpt avatar Aug 27 '24 09:08 driverpt

Hi, Thanks for bringing up this PR. The code looks good to me so Ill run the approval workflow to get the testing process started, but can you also create an integration tests testing the happy path from beginning to end?

jysheng123 avatar Sep 10 '24 16:09 jysheng123

Can you also run make black to fix the formatting changes?

jysheng123 avatar Sep 10 '24 16:09 jysheng123

Hi @driverpt, just wanted to check in about the state of this PR and if you had the capacity to work on it or if there was anything you needed to move forward

lucashuy avatar Sep 23 '24 20:09 lucashuy

Hello. I can work on it. But I'm waiting on the CF Spec to be discussed

driverpt avatar Sep 23 '24 20:09 driverpt

I've chatted with some team members, and the Metadata section is likely a better location, than inside of Properties. This won't require a spec change, and will only impact SAM CLI as the Metadata doesn't impact SAM transform. Having a CLI option was also brought up, but using an option here might make the UX a little messy in terms of deciding how we want to pass in function names into the option.

lucashuy avatar Sep 25 '24 20:09 lucashuy

Hey @driverpt looking at the discussion here, I saw that recommendation is to use Metadata of the resources. Please let us know when you can follow-up with those changes, so that we can continue the review.

Thanks!

mndeveci avatar Oct 18 '24 20:10 mndeveci

Hi @driverpt, following up to check if you were planning to make the above requested changes and had any questions the team could help with.

hnnasit avatar Oct 30 '24 21:10 hnnasit

Hello. Haven't yet had the time to implement this. I'll probably take a look at it this weekend

driverpt avatar Oct 30 '24 21:10 driverpt

Seems some lint issue, please help to run make pr locally and resolve outstanding issue. Thanks!

roger-zhangg avatar Jan 23 '25 22:01 roger-zhangg

Thank you for the update.

vicheey avatar Feb 17 '25 09:02 vicheey

any ETA on this one?

driverpt avatar Mar 19 '25 14:03 driverpt

The PR is still failing some checks. Looks like a formatting issue. I think you should be able to solve it by running make format. @driverpt could you please help to that? Thanks

mbfreder avatar Mar 19 '25 20:03 mbfreder

Done, can you please re-review ?

driverpt avatar Mar 20 '25 11:03 driverpt

Thank you. I am taking a look.

vicheey avatar Mar 20 '25 17:03 vicheey

Everything looks good. The only lingering point is the the naming that I'll discuss with the team members. I'll get back to you soon. Once again, thank you for your amazing contribution.

vicheey avatar Mar 20 '25 17:03 vicheey