Skip to content

fix(control-plane): discard malformed SQS messages - #5219

Merged
edersonbrilhante merged 2 commits into
mainfrom
fix-malformed-sqs-messages
Jul 23, 2026
Merged

fix(control-plane): discard malformed SQS messages#5219
edersonbrilhante merged 2 commits into
mainfrom
fix-malformed-sqs-messages

Conversation

@edersonbrilhante

Copy link
Copy Markdown
Contributor

Description

Treat malformed SQS message bodies as permanent, non-retryable failures. The scale-up handler logs and acknowledges malformed records so they do not block valid messages in the same batch or repeatedly return to the queue.

Document the SQS event source mapping contract near batchItemFailures and update the focused handler tests for the new behavior.

Test Plan

  1. Send a scale-up SQS batch containing one valid message and one malformed JSON body.
  2. Confirm the valid message is passed to scaleUp.
  3. Confirm the malformed message is logged but omitted from batchItemFailures.
  4. Confirm a message rejected by scaleUp is still returned in batchItemFailures.
  5. Run yarn vitest run functions/control-plane/src/lambda.test.ts --config functions/control-plane/vitest.config.ts --reporter=dot.

Related Issues

None.

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@edersonbrilhante
edersonbrilhante marked this pull request as ready for review July 22, 2026 13:11
@edersonbrilhante
edersonbrilhante requested a review from a team as a code owner July 22, 2026 13:11
@edersonbrilhante
edersonbrilhante merged commit 8ca5816 into main Jul 23, 2026
9 checks passed
@edersonbrilhante
edersonbrilhante deleted the fix-malformed-sqs-messages branch July 23, 2026 08:22
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.

2 participants