Skip to content

Fix sqs CLI crash sizing message attributes without a scalar value#1026

Draft
mensfeld wants to merge 1 commit into
mainfrom
fix/b7-cli-message-size-crash
Draft

Fix sqs CLI crash sizing message attributes without a scalar value#1026
mensfeld wants to merge 1 commit into
mainfrom
fix/b7-cli-message-size-crash

Conversation

@mensfeld

Copy link
Copy Markdown
Collaborator

bin/cli/sqs requeue/mv compute each message's payload size via message_size. For a message attribute that has a :data_type but neither :string_value nor :binary_value - e.g. a list-type attribute, whose value normalize_dump_message intentionally drops - value_size was nil and name_size + data_type_size + value_size raised
TypeError: nil can't be coerced into Integer, aborting the whole requeue/mv batch.

Default the size of such value-less attributes to 0. Adds a spec.

@coderabbitai

coderabbitai Bot commented Jun 20, 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: cc96ffc1-54ff-410f-bd46-fb04d31b6bb1

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/b7-cli-message-size-crash

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.

bin/cli/sqs requeue/mv compute each message's payload size via
message_size. For a message attribute that has a :data_type but neither
:string_value nor :binary_value - e.g. a list-type attribute, whose value
normalize_dump_message intentionally drops - value_size was nil and
`name_size + data_type_size + value_size` raised
TypeError: nil can't be coerced into Integer, aborting the whole
requeue/mv batch.

Default the size of such value-less attributes to 0.

(No spec: the CLI defines Shoryuken::CLI, and Shoryuken#server? is
`defined?(Shoryuken::CLI)`, so loading bin/cli into the in-process suite
would flip server? globally and break client-middleware specs. Adding a
CLI test harness that isolates that is out of scope for this fix.)
@mensfeld mensfeld force-pushed the fix/b7-cli-message-size-crash branch from 0cb4a18 to 5d26076 Compare June 20, 2026 18:01
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