Skip to content
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

Closed
staycoolcall911 opened this issue Feb 14, 2023 · 5 comments · Fixed by #4355
Assignees
Labels
✨ enhancement New feature or request good first issue Good for newcomers 🎨 sdk SDK

Comments

@staycoolcall911
Copy link
Contributor

Community Note

Please vote by adding a 👍 reaction to the issue to help us prioritize.
If you are interested to work on this issue, please leave a comment.

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

@github-actions
Copy link

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.
Feel free to re-open this issue when there's an update or relevant information to be added.
Thanks!

@github-actions
Copy link

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.
Feel free to re-open this issue when there's an update or relevant information to be added.
Thanks!

@itssubhodiproy
Copy link
Contributor

Hi @staycoolcall911 , I would like to work on this. Can you assign this to me?

@staycoolcall911
Copy link
Contributor Author

Yes @subh-cs, thank you.
Please let us know if you have questions or need pointers throughout your work on this issue.
We're available either here on this issue or in Slack on #dev channel.

@mergify mergify bot closed this as completed in #4355 Oct 1, 2023
mergify bot pushed a commit that referenced this issue Oct 1, 2023
## 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)*.
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.34.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request good first issue Good for newcomers 🎨 sdk SDK
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants