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

fix(sdk): aws queue client does not delete popped messages #4314

Merged
merged 5 commits into from
Sep 29, 2023

Conversation

flyingImer
Copy link
Collaborator

Checklist

  • Title matches Winglang's style guide
  • Description explains motivation and solution
  • 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.

@flyingImer flyingImer requested a review from a team as a code owner September 27, 2023 19:12
@flyingImer flyingImer changed the title fix(sdk): aws queue client does not delete popped messages [WIP] fix(sdk): aws queue client does not delete popped messages Sep 27, 2023
Copy link
Contributor

@Chriscbr Chriscbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

In the future I wonder if we should rework the Queue API to give the user a bit more control -- e.g. pop could return you a Task object that can be deleted from the queue with task.complete()

libs/wingsdk/src/shared-aws/queue.inflight.ts Show resolved Hide resolved
Copy link
Collaborator

@tsuf239 tsuf239 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are passing!
image

@flyingImer flyingImer changed the title [WIP] fix(sdk): aws queue client does not delete popped messages fix(sdk): aws queue client does not delete popped messages Sep 28, 2023
@flyingImer
Copy link
Collaborator Author

LGTM

In the future I wonder if we should rework the Queue API to give the user a bit more control -- e.g. pop could return you a Task object that can be deleted from the queue with task.complete()

I actually had a couple of POCs on that track, but ended up dropping them. I think the current queue API is closer to the classic data structure interface, so I pivoted to match the simulator behavior.

However, I definitely agree with you on the user control story, especially after seeing messages like "queue is not FIFO" in the code base. Queue API might need to re-position itself a bit between classic queue surface and its characteristic of being distributed in the cloud.

@monadabot monadabot added the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Sep 28, 2023
@Chriscbr
Copy link
Contributor

Ran the queue tests again, all passed 👍

@Chriscbr Chriscbr removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Sep 29, 2023
@mergify
Copy link
Contributor

mergify bot commented Sep 29, 2023

Thanks for contributing, @flyingImer! This PR will now be added to the merge queue, or immediately merged if fix-queue-pop-iii is up-to-date with main and the queue is empty.

mergify bot added a commit that referenced this pull request Sep 29, 2023
@mergify mergify bot merged commit fac3f72 into winglang:main Sep 29, 2023
15 checks passed
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.33.24.

@flyingImer flyingImer deleted the fix-queue-pop-iii branch September 29, 2023 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants