-
Notifications
You must be signed in to change notification settings - Fork 181
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
AWS bucket notification events don't differ create and update one. #2724
Comments
* Adding a second argument (event type) for bucket.onEvent, so now it's aligned to the spec (fixes #192, but not systemically) * Improving `bucket/events.w` test * Adding an example for functions that return functions * Exposing a severe error in aws events- #2724 ### <samp>🤖 Generated by Copilot at 7bfe8d9</samp> This pull request adds and updates several examples and tests for Wing, especially related to bucket events and functions as values. It also modifies the `convertBetweenHandlers` function and the `BucketEventHandlerClient` class to support passing additional arguments to handler clients. It updates the snapshots to reflect the changes in the examples, tests, and compilation output. ___ ## Checklist - [x] Title matches [Winglang's style guide](https://docs.winglang.io/contributors/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*.
* Adding a second argument (event type) for bucket.onEvent, so now it's aligned to the spec (fixes #192, but not systemically) * Improving `bucket/events.w` test * Adding an example for functions that return functions * Exposing a severe error in aws events- #2724 This pull request adds and updates several examples and tests for Wing, especially related to bucket events and functions as values. It also modifies the `convertBetweenHandlers` function and the `BucketEventHandlerClient` class to support passing additional arguments to handler clients. It updates the snapshots to reflect the changes in the examples, tests, and compilation output. ___ - [x] Title matches [Winglang's style guide](https://docs.winglang.io/contributors/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*.
## Description Finally closes #2114 !! 1. handled tests: * hidden: api/ delete, patch, option, get, put, post - #3342 * hidden: bucket/events - #2724 * hidden: queue/timeout - #3354 * fixed: counter/dec - there was a bug working with both key and initial key different than 0 * fixed: function/memory_and_env- adjusted test * fixed: function/timeout- adjusted test * fixed- table/add_row - the key wasn't saved in the object when adding a key on preflight on sim, fixed and adjusted test * fixed - website/website - adjusted test * fixed - util/env- adjusted test, since utils.env is working, it is just that the meta comments aren't followed when using the cli and not hangar 2. Run build to generate new snapshots 3. edited the compatibility matrix - leftover tests detected: #3358 ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://www.winglang.io/terms-and-policies/contribution-license.html)*.
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Closing this since I've just tested the code and it works as expected now. |
It may work on sim, but still doesn't work in AWS: |
Hi, This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
I tried this:
This happened:
"CREATED" is logged twice.
We are using the "putObjectCommand" both for uploading and updating a key. This will always result in a PUT event (https://stackoverflow.com/questions/53421520/objectcreatedpost-on-s3-console-upload).
it seems like the only way to get a POST event is to do it via the browser, there is no equivalent command in @aws-sdk/client-s3, unfortunately.
I also looked at the notification payload, there is nothing that differentiates one from the other.
We may be able to conclude what kind of event is sent by looking at the object versioning.
On the other hand, if it's a necessary feature- we could find a workaround and gain a lot of users 😊
I expected this:
"CREATED" to be logged once, and "UPDATED" to be logged once.is
Is there a workaround?
No response
Component
SDK
Wing Version
0.17.43
Wing Console Version
No response
Node.js Version
No response
Platform(s)
MacOS
Anything else?
No response
Community Notes
The text was updated successfully, but these errors were encountered: