Skip to content

Conversation

@baermat
Copy link
Member

@baermat baermat commented Mar 26, 2025

Motivation

As per title. FIFO messages should not be deleted if the provided receipt handle has expired, tests against AWS failed consistently. Reversely, the same test succeeded consistently on standard queues, making fifo specific code necessary.
fixes #12278

Changes

  • adds tests to confirm the issue
  • adds new methods to decouple some of the extraction steps for the receipt handle to access time-related information
  • adds _pre_delete_checks hook when removing messages, because this behaviour is fifo specific, and a complete remodel of the delete method to separate standard and fifo behaviour to make this cleaner was out of scope for this PR.

@baermat baermat added the semver: patch Non-breaking changes which can be included in patch releases label Mar 26, 2025
@github-actions
Copy link

github-actions bot commented Mar 26, 2025

LocalStack Community integration with Pro

    2 files  ±    0      2 suites  ±0   1h 13m 6s ⏱️ - 39m 58s
3 056 tests  - 1 258  2 927 ✅  - 1 059  129 💤  - 199  0 ❌ ±0 
3 058 runs   - 1 258  2 927 ✅  - 1 059  131 💤  - 199  0 ❌ ±0 

Results for commit bf73c2c. ± Comparison against base commit 1005e96.

This pull request removes 1262 and adds 4 tests. Note that renamed tests count towards both.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…
tests.aws.services.sqs.test_sqs.TestSqsProvider ‑ test_delete_after_visibility_timeout[sqs]
tests.aws.services.sqs.test_sqs.TestSqsProvider ‑ test_delete_after_visibility_timeout[sqs_query]
tests.aws.services.sqs.test_sqs.TestSqsProvider ‑ test_fifo_delete_after_visibility_timeout[sqs]
tests.aws.services.sqs.test_sqs.TestSqsProvider ‑ test_fifo_delete_after_visibility_timeout[sqs_query]

♻️ This comment has been updated with latest results.

@baermat baermat changed the title Deleting a FIFO message with a expired receipt handle should raise an error Deleting a FIFO message with an expired receipt handle should raise an error Mar 26, 2025
@baermat baermat marked this pull request as ready for review March 26, 2025 17:22
Copy link
Contributor

@gregfurman gregfurman left a comment

Choose a reason for hiding this comment

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

Have left some comments mostly related to snapshot testing. Feel free to ignore my nits 🙂

@baermat baermat requested a review from gregfurman March 28, 2025 14:43
Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

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

LGTM! thanks for fixing this :-)

just two minor nits, nothing blocking

@baermat baermat force-pushed the sqs-fifo-visibility-timeout-11774 branch from 0ce4b09 to bf73c2c Compare April 1, 2025 08:24
@thrau thrau merged commit ac0ff24 into master Apr 1, 2025
31 checks passed
@thrau thrau deleted the sqs-fifo-visibility-timeout-11774 branch April 1, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Deleting a message from the queue after visibility timeout expired doesn't throw ReceiptHandleIsInvalid

3 participants