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

refactor sqs deveoper api into its own module#13202

Merged
thrau merged 1 commit intomainfrom
sqs-dev-endpoint-refactoring
Sep 30, 2025
Merged

refactor sqs deveoper api into its own module#13202
thrau merged 1 commit intomainfrom
sqs-dev-endpoint-refactoring

Conversation

@thrau
Copy link
Member

@thrau thrau commented Sep 26, 2025

Motivation

There were two long-standing issues in our internal issue tracker to:

  • Remove moto imports from sqs, and
  • Move SQS developer endpoints out of provider.py for better readability and maintainability

This PR achieves those two things.

The PR looks like a lot of changes, but really all I did was

  • Move SqsDeveloperEndpoints from provider.py into developer_api.py (I also renamed it to SqsDeveloperApi, which I think is more fitting)
  • Move all methods that class was using from provider.py into utils.py or models.py - otherwise we'd have a circular reference
  • Inline everything that was used from moto into the modules (it was just two util methods for create_message_attribute_hash that moved into utils.py

This also triggered a minor import change in lambda, which uses SQS internals.

Changes

  • No behavioral changes to localstack, only some code refactoring
  • Renamed SqsDeveloperEndpoints to SqsDeveloperApi and moved it into its own module. pulled out utility functions along the way

@thrau thrau added semver: minor Non-breaking changes which can be included in minor releases, but not 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 Sep 26, 2025
@github-actions
Copy link

Test Results - Preflight, Unit

22 277 tests  ±0   20 536 ✅ ±0   15m 6s ⏱️ -22s
     1 suites ±0    1 741 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 3f62692. ± Comparison against base commit 1d26fe7.

@github-actions
Copy link

Test Results (amd64) - Acceptance

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

Results for commit 3f62692. ± Comparison against base commit 1d26fe7.

@github-actions
Copy link

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 6m 13s ⏱️
3 866 tests 3 618 ✅ 248 💤 0 ❌
3 872 runs  3 618 ✅ 254 💤 0 ❌

Results for commit 3f62692.

@github-actions
Copy link

LocalStack Community integration with Pro

    2 files  ±  0      2 suites  ±0   1h 35m 40s ⏱️ - 24m 7s
3 842 tests  - 948  3 590 ✅  - 864  252 💤  - 84  0 ❌ ±0 
3 844 runs   - 948  3 590 ✅  - 864  254 💤  - 84  0 ❌ ±0 

Results for commit 3f62692. ± Comparison against base commit 1d26fe7.

This pull request removes 995 and adds 47 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_developer_api.TestSqsDeveloperApi ‑ test_fifo_list_messages_as_botocore_endpoint_url[json-domain]
tests.aws.services.sqs.test_sqs_developer_api.TestSqsDeveloperApi ‑ test_fifo_list_messages_as_botocore_endpoint_url[json-path]
tests.aws.services.sqs.test_sqs_developer_api.TestSqsDeveloperApi ‑ test_fifo_list_messages_as_botocore_endpoint_url[json-standard]
tests.aws.services.sqs.test_sqs_developer_api.TestSqsDeveloperApi ‑ test_fifo_list_messages_as_botocore_endpoint_url[query-domain]
tests.aws.services.sqs.test_sqs_developer_api.TestSqsDeveloperApi ‑ test_fifo_list_messages_as_botocore_endpoint_url[query-path]
tests.aws.services.sqs.test_sqs_developer_api.TestSqsDeveloperApi ‑ test_fifo_list_messages_as_botocore_endpoint_url[query-standard]
tests.aws.services.sqs.test_sqs_developer_api.TestSqsDeveloperApi ‑ test_fifo_list_messages_with_invisible_messages[domain]
tests.aws.services.sqs.test_sqs_developer_api.TestSqsDeveloperApi ‑ test_fifo_list_messages_with_invisible_messages[path]
tests.aws.services.sqs.test_sqs_developer_api.TestSqsDeveloperApi ‑ test_fifo_list_messages_with_invisible_messages[standard]
tests.aws.services.sqs.test_sqs_developer_api.TestSqsDeveloperApi ‑ test_list_messages_as_botocore_endpoint_url[json-domain]
…

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.

LGTM!

@thrau thrau merged commit 8a4c5b7 into main Sep 30, 2025
53 of 56 checks passed
@thrau thrau deleted the sqs-dev-endpoint-refactoring branch September 30, 2025 09:01
@alexrashed alexrashed added this to the 4.9 milestone Sep 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup