X Tutup
Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Improve types for the SQS store#13684

Merged
giograno merged 5 commits intomainfrom
sqs-avro
Feb 3, 2026
Merged

Improve types for the SQS store#13684
giograno merged 5 commits intomainfrom
sqs-avro

Conversation

@giograno
Copy link
Member

@giograno giograno commented Feb 3, 2026

Motivation

With the push towards Avro-based serialization, we have to improve the type annotations for the stores.

Changes

  • A few fixes to the type annotations.

@giograno giograno self-assigned this Feb 3, 2026
@giograno giograno added area: persistence Retain state between LocalStack runs aws:sqs Amazon Simple Queue Service semver: patch Non-breaking changes which can be included in patch releases docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes labels Feb 3, 2026
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Test Results - Preflight, Unit

23 114 tests  +26   21 255 ✅ +26   6m 12s ⏱️ -10s
     1 suites ± 0    1 859 💤 ± 0 
     1 files   ± 0        0 ❌ ± 0 

Results for commit 70f7bfd. ± Comparison against base commit 39ec7cf.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 3s ⏱️ ±0s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 70f7bfd. ± Comparison against base commit 39ec7cf.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 39m 55s ⏱️
5 610 tests 5 049 ✅ 561 💤 0 ❌
5 616 runs  5 049 ✅ 567 💤 0 ❌

Results for commit 70f7bfd.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

LocalStack Community integration with Pro

    2 files      2 suites   1h 59m 8s ⏱️
5 189 tests 4 798 ✅ 391 💤 0 ❌
5 191 runs  4 798 ✅ 393 💤 0 ❌

Results for commit 70f7bfd.

♻️ This comment has been updated with latest results.

@giograno giograno marked this pull request as ready for review February 3, 2026 09:56
@giograno giograno requested review from bentsku and removed request for dominikschubert, gregfurman and simonrw February 3, 2026 09:56
Copy link
Member

@baermat baermat left a comment

Choose a reason for hiding this comment

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

I am honestly surprised that all our tests still pass with the removal or addition of certain default values, so good job cleaning those up! 😄 Not counting those that were simply moved of course.
I have 2 questions, once those are answered (not necessarily with code change), we are good to go from my side.

Comment on lines -68 to -69
message_deduplication_id: str
message_group_id: str
Copy link
Member

Choose a reason for hiding this comment

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

Where was the problem with message_deduplocation_id and message_group_id? 🙂

Copy link
Member Author

Choose a reason for hiding this comment

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

If you look at the constructor, they are provided as parameter but an instance variable is never assigned. They are used to populate the attributes dict.

Comment on lines 794 to -787
class StandardQueue(SqsQueue):
visible: InterruptiblePriorityQueue[SqsMessage]
Copy link
Member

Choose a reason for hiding this comment

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

This seems like a real loss of type information, is there no way of retaining it?

Copy link
Member Author

Choose a reason for hiding this comment

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

InterruptiblePriorityQueue is not declared as a generic class. Therefore, the parametrization was not really correct.
It is only used in SQS with SqsMessage to the best of my knowledge. We could just remove the parametrization as I did, or declare the class generic (something like class InterruptiblePriorityQueue[T](PriorityQueue, InterruptibleQueue): .... I do not have big preferences.

Copy link
Member

Choose a reason for hiding this comment

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

let's make InterruptiblePriorityQueue generic!

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 70f7bfd. I will move to the newer genetic syntax after #13688

@giograno giograno requested a review from baermat February 3, 2026 10:50
@giograno giograno merged commit 2a499fd into main Feb 3, 2026
42 checks passed
@giograno giograno deleted the sqs-avro branch February 3, 2026 16:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: persistence Retain state between LocalStack runs aws:sqs Amazon Simple Queue Service docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes 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.

3 participants

X Tutup