Skip to content

Use long polling in sqs CLI find_all so dump/mv don't stop early#1032

Draft
mensfeld wants to merge 1 commit into
mainfrom
fix/b8-cli-find-all-short-polling
Draft

Use long polling in sqs CLI find_all so dump/mv don't stop early#1032
mensfeld wants to merge 1 commit into
mainfrom
fix/b8-cli-find-all-short-polling

Conversation

@mensfeld

Copy link
Copy Markdown
Collaborator

find_all (used by sqs dump and sqs mv, both defaulting --number to Float::INFINITY) terminated on the first empty receive_message response. With the default short polling, SQS samples only a subset of its hosts and routinely returns an empty batch while the queue still has messages, so on real (distributed) SQS dump/mv quietly processed only a fraction of the queue (invisible on single-node LocalStack).

Long poll (wait_time_seconds) and only stop after several consecutive empty batches, so the queue is actually drained.

(No spec: exercising bin/cli in-process defines Shoryuken::CLI, and Shoryuken#server? is defined?(Shoryuken::CLI), which would flip server? globally and break other specs - same constraint as the CLI fix in the message_size PR.)

find_all (used by sqs dump and sqs mv, both defaulting --number to
Float::INFINITY) terminated on the first empty receive_message response.
With the default short polling, SQS samples only a subset of its hosts and
routinely returns an empty batch while the queue still has messages, so on
real (distributed) SQS dump/mv quietly processed only a fraction of the
queue (invisible on single-node LocalStack).

Long poll (wait_time_seconds) and only stop after several consecutive
empty batches, so the queue is actually drained.

(No spec: exercising bin/cli in-process defines Shoryuken::CLI, and
Shoryuken#server? is defined?(Shoryuken::CLI), which would flip server?
globally and break other specs - same constraint as the CLI fix in the
message_size PR.)
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4d021ca3-f540-4a51-95a0-8dc55a081e8b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/b8-cli-find-all-short-polling

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant