-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
S3: Multiple Transitions in lifecycle configuration #6439
S3: Multiple Transitions in lifecycle configuration #6439
Conversation
Handle multiple Transitions/NoncurrentVersionTranstions in bucket lifecycle configuration. Fixes getmoto#6388
Inheriting BaseModel ensures that the classes show up on the Moto Dashboard, for people that are using the MotoServer. So it makes a lot of sense to use it here.
Me neither! But if it's wrong, I'm sure somebody will complain. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thank you for fixing this @ccatterina!
The Thank you for contributing to Moto! To show our thanks, we'd like to share some of the donations that we've received with you. PR's like this are the big reason that Moto is as successful as it is - so it's only fair that you, as a contributor, gets to share the spoils. We've created a companion website with more information: Feel free to open a bug or discussion if you run into any problems: |
This is now part of moto >= 4.1.12.dev62 |
@bblommers Thank you, I appreciate it! |
FYI @ccatterina, I just noticed a bug in our login-flow for https://payments.getmoto.org. I don't know if you encountered this, but if you did - apologies! This should now be fixed. |
@bblommers yes, I encountered it and I thought it was a temporary problem. Thank you! 😊 |
Hi @bblommers,
Some points about the implementation:
NoncurrentVersionTransitions
could be a list of multiple transitions so I made some changes to allow also multipleNoncurrentVersionTransitions
.NewerNoncurrentVersions
toNoncurrentVersionTransitions
. https://docs.aws.amazon.com/AmazonS3/latest/API/API_NoncurrentVersionTransition.htmlLifecycleTransition
andLifeCycleNoncurrentVersionTransition
along the lines ofLifecycleRule
but I didn't understand exactly the purpose ofBaseModel
class. Is this approach ok?Transitions
andNoncurrentVersionTransitions
to the dict returned byLifecyleRule.to_config_dict
but I don't understand if I need to respect some structure or properties should have predefined names.