Feat/adding UI for aws sqs#142
Open
ingluisfelipemunoz wants to merge 9 commits into
Open
Conversation
- list(): follow ListQueuesCommand NextToken instead of dropping queues past the first page - sendMessage(): require messageGroupId for FIFO queues and pass MessageGroupId/MessageDeduplicationId through to SendMessageCommand; QueueFlowPanel now surfaces these fields when a FIFO queue is selected - toResource(): parse RedrivePolicy safely so one malformed policy can't break list()/get() for every queue - QueueFlowPanel: add a Cancel option to the purge confirmation, and key message-attribute rows by a stable id instead of array index Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Tie the receive mutation to the queueId it targeted so a slow long-poll response can't leak messages into a different queue's list after the user switches queues mid-request. Also dedupe by the stable message id instead of receiptHandle, which changes on SQS redelivery and let the same message reappear as a false "new" entry. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Amazon SQS as a new Cloud Explorer service (
queue), including adedicated Amazon-Console-style "send and receive messages" flow view.
packages/api): newqueueCloudServiceType,AwsQueueAdapter(
@aws-sdk/client-sqs) implementing list/get/create/delete plussendMessage/receiveMessages/deleteMessage/purgeQueue,queueSchema.ts,and the matching
/api/clouds/aws/services/queue/...routes(
.../messages,.../messages/delete,.../purge). Registered incloudProxy.tsandCloudProxyService.tsfollowing the existing SPI pattern.packages/frontend):queuewired intoCloudServiceType,the Cloud Explorer nav/routing, and
DynamicResourceView. NewQueueFlowPanelcomponent renders a Producer → Queue → Consumer flowdiagram with live message-count badges, animated connectors, a
dead-letter-queue branch when a redrive policy is set, a send-message form
(body + message attributes), and a receive/poll panel with per-message
delete (ack). Also fixed the
queuecard on the Cloud Console home page(
useCloudConsoleHomeData), which previously pointed at a nonexistent/queueroute with a placeholder icon and no resource count.list()now followsListQueuesCommand'sNextTokeninstead of silently dropping queues past the first page;
sendMessagerequires and forwards
MessageGroupId/MessageDeduplicationIdfor FIFOqueues (previously every FIFO send was rejected by SQS), with matching
fields added to
QueueFlowPanel; a malformedRedrivePolicyattribute nolonger throws and breaks
list()/get()for every queue; the purgeconfirmation now has a Cancel option; message-attribute rows are keyed by
a stable id instead of array index; and the receive mutation is now scoped
to the queue it targeted (a stale long-poll response could otherwise leak
messages into a different queue's list) and dedupes by message id instead
of receipt handle (which changes on SQS redelivery).
Closes #77, closes #65
Type of change
fix:)feat:)feat!:orfix!:)Area
packages/frontend)packages/api)Verification
Tested against AWS SQS via a local Floci core (
:4566), both directly viacurlagainst the API routes and end-to-end through the UI:and purged the queue — confirmed message counts (
Available/In flight/Delayed) update on the flow diagram.and routes to
/cloud-explorer/aws/queue..fifoqueue and sendingwithout a
messageGroupIdnow returns400 messageGroupId is required...,and sending with one succeeds (
201).messages: polling renders all received message bodies with their receive
counts, live counts update (
Available/In flight), and deleting amessage removes it from the list while the rest correctly return to
Availableafter their visibility timeout.Checklist
pnpm lint,pnpm type-check,pnpm test, andpnpm buildpass locallybun testinpackages/api)