-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Fix visibility check in _pre_delete_checks to use is_visible attribute #13223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix visibility check in _pre_delete_checks to use is_visible attribute #13223
Conversation
…ete after visibility timeout extension
localstack-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to LocalStack! Thanks for raising your first Pull Request and landing in your contributions. Our team will reach out with any reviews or feedbacks that we have shortly. We recommend joining our Slack Community and share your PR on the #community channel to share your contributions with us. Please make sure you are following our contributing guidelines and our Code of Conduct.
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
@baermat can you help me review this PR please? |
|
this looks like a really good change, thanks @xhoantran! i've triggered the CI run and will let @baermat shepherd the contribution from here 👍 |
|
Hi @baermat, all the builds are passed. Can you help me review please? |
baermat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @xhoantran , thank you for contribution! These changes are looking good, they will be a valuable addition to LocalStack!
Motivation
Resolves #12954
This pull request updates the logic for validating SQS message receipt handles before deletion. The main change is to use the
is_visibleproperty of the message instead of calculating expiration based on the last received timestamp and visibility timeout.Changes
_pre_delete_checksmethod inlocalstack-core/localstack/services/sqs/models.pyto check theis_visibleproperty of a message when validating receipt handles, rather than computing expiration from the last received time and visibility timeout. This simplifies and potentially improves the accuracy of message deletion checks.Testing
test_fifo_delete_after_visibility_timeout_extendedSNAPSHOT_UPDATE=1 TEST_TARGET=AWS_CLOUD TEST_PATH="tests/aws/services/sqs" make testTEST_PATH="tests/aws/services/sqs" make test