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
migrate S3 notifications to ASF #6903
Conversation
7318440
to
dadd87d
Compare
dadd87d
to
35e5435
Compare
35e5435
to
f2f03dd
Compare
f2f03dd
to
f04572f
Compare
f04572f
to
627a713
Compare
localstack/services/s3/provider.py
Outdated
class InvalidArgumentError(CommonServiceException): | ||
def __init__(self, message: str, name: str, value: str): | ||
super().__init__("InvalidArgument", message, 400, False) | ||
# TODO how to set values? | ||
|
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.
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.
great progress on the provider!
i have two major points that i think we should address, either in this PR or as part of an immediate refactoring:
- processing notifications asynchronously
- i think the event notification code would be easier to understand and more maintainable if we used OOP concepts and introduced some basic abstractions. in particular to process event notifications asynchronously it will help to encapsulate the event context into an object, and homogenize the send_event api. i made some suggestions inline.
i think 1. is quite essential since that seems to be how AWS behaves. at least in the lambda documentation it says that Amazon S3 invokes your function asynchronously.
in terms of code organization i think we should move all the code related to notifications into a separate module notifications.py
to keep the provider.py
a little slimmer.
@bentsku let's discuss who will do the refactoring.
627a713
to
720e078
Compare
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.
this is great! thanks for refactoring this @bentsku , i think this is much cleaner and easier to understand, and also more maintainable!
ed6c37d
to
4b60a7f
Compare
4b60a7f
to
17daf4c
Compare
- store notification config in s3-store - notifications for eventbridge, sqs, sns, lambda - add snapshot to tests - implement filter validation - add verification for notification destination
17daf4c
to
ad964dd
Compare
This PR contains S3 bucket notifications for:
Implemented:
Following events are covered (also by existing tests):
Other implementation:
Known Issues + Future work:
InvalidArgument
Error: marked a few TODOs here, because in another PR we already have a batch for that missing Exceptiontest_create_object_by_presigned_request_via_dynamodb
is failing)