-
Notifications
You must be signed in to change notification settings - Fork 196
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
Compiler error when a queue resource has a visibility timeout lower than its consumer's timeout #1526
Comments
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. |
Hi @staycoolcall911 , I would like to work on this. Can you assign this to me? |
Yes @subh-cs, thank you. |
## Checklist tests are passing now tf-aws: <img width="682" alt="image" src="https://github.com/winglang/wing/assets/39455181/082a8633-3a98-450a-a3d5-6d437689132e"> awscdk: <img width="665" alt="image" src="https://github.com/winglang/wing/assets/39455181/f85314db-b7db-4150-96ba-581dfb66b364"> (also fixes: #1526) - [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 [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
Congrats! 🚀 This was released in Wing 0.34.6. |
Community Note
Feature Spec
As a user I would like the wing compiler to throw an error when I'm defining a queue with visibility timeout lower than the timeout defined for its consumer (most likely a function).
Use Cases
For a message M, queue Q, lambda A, lambda B:
Q's visibility timeouts after 30 seconds, lambda A takes 45 seconds to process, but Q already timed out so it provides the same message M to another lambda B.
This message is processed by 2 consumers, which breaks the queue's contract.
Please note: this behavior will not reach production as it is currently validated by Terraform.
terraform apply
would break and print this error: "InvalidParameterValueException: Queue visibility timeout: 30 seconds is less than Function timeout: 60 seconds".See #1507 for an example.
Implementation Notes
This should be caught by the SDK when compiling a queue resource.
Component
SDK
The text was updated successfully, but these errors were encountered: