Skip to content

Conversation

@viren-nadkarni
Copy link
Member

@viren-nadkarni viren-nadkarni commented May 29, 2025

SQS Query API endpoints were not being registered in the provider lifecycle hooks, as is the convention.

The original change appears to have been made around the time when lifecycle hooks were introduced which might have led to it being missed. Plus there is no evidence that this is a workaround for an edge case.

This PR therefore fixes this.

@viren-nadkarni viren-nadkarni added this to the Playground milestone May 29, 2025
@viren-nadkarni viren-nadkarni self-assigned this May 29, 2025
@viren-nadkarni viren-nadkarni added the semver: patch Non-breaking changes which can be included in patch releases label May 29, 2025
@github-actions
Copy link

Test Results - Preflight, Unit

21 579 tests  ±0   19 927 ✅ ±0   6m 17s ⏱️ +3s
     1 suites ±0    1 652 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit b18b926. ± Comparison against base commit 79b46be.

@github-actions
Copy link

Test Results (amd64) - Acceptance

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

Results for commit b18b926. ± Comparison against base commit 79b46be.

@github-actions
Copy link

Test Results - Alternative Providers

597 tests   420 ✅  14m 59s ⏱️
  4 suites  177 💤
  4 files      0 ❌

Results for commit b18b926.

@github-actions
Copy link

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 44m 18s ⏱️ +54s
4 469 tests ±0  4 080 ✅ ±0  389 💤 ±0  0 ❌ ±0 
4 471 runs  ±0  4 080 ✅ ±0  391 💤 ±0  0 ❌ ±0 

Results for commit b18b926. ± Comparison against base commit 79b46be.

@github-actions
Copy link

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 20m 53s ⏱️
4 824 tests 4 282 ✅ 542 💤 0 ❌
4 830 runs  4 282 ✅ 548 💤 0 ❌

Results for commit b18b926.

@viren-nadkarni viren-nadkarni marked this pull request as ready for review May 29, 2025 11:47
@viren-nadkarni viren-nadkarni removed the request for review from thrau May 29, 2025 11:47
return sqs_stores[account_id][region]

def on_before_start(self):
query_api.register(ROUTER)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also be removing these in the on_before_stop hook or is this automatically handled?

Copy link
Contributor

Choose a reason for hiding this comment

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

@viren-nadkarni Lmk if you still have capacity to address this. Otherwise, I'll happily take it over 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @gregfurman, very much appreciated!

I had a brief looked at the API to remove endpoints, unfortunately there's no way to remove by router, only by endpoints. Besides it is a expensive operation.

In other services I looked at, the custom routes are not usually removed at provider shutdown. But the route removal only matters only when providers are restarted due to persistence/state endpoints, not when LS itself terminates.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha! Let's ship it then 😀

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, will merge when companion PR is approved and ready to go

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll checkout both your branches and ensure everything starts up OK.

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.

Just to state it: LGTM, and a go from my side once Greg's points are addressed

@viren-nadkarni viren-nadkarni merged commit d724a69 into master Jun 17, 2025
62 checks passed
@viren-nadkarni viren-nadkarni deleted the sqs-route-registration branch June 17, 2025 10:34
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.

4 participants