GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Sns/v2 topic migration by baermat · Pull Request #13205 · localstack/localstack
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Conversation
|
Test Results - Preflight, Unit22 292 tests +11 20 549 ✅ +11 15m 18s ⏱️ -34s Results for commit f713a3c. ± Comparison against base commit e60ff8e. ♻️ This comment has been updated with latest results. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Test Results - Alternative Providers132 tests 9 ✅ 23s ⏱️ Results for commit f713a3c. ♻️ This comment has been updated with latest results. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Test Results (amd64) - Acceptance7 tests ±0 5 ✅ ±0 3m 22s ⏱️ -1s Results for commit f713a3c. ± Comparison against base commit e60ff8e. ♻️ This comment has been updated with latest results. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 59m 50s ⏱️ - 59m 22s Results for commit f713a3c. ± Comparison against base commit e60ff8e. This pull request removes 1975 and adds 7 tests. Note that renamed tests count towards both.This pull request removes 225 skipped tests and adds 2 skipped tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 1h 28m 28s ⏱️ Results for commit f713a3c. ♻️ This comment has been updated with latest results. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice work, this is looking great! I believe this to be a sound base to continue building on 🚀
The only issue is using plain Python class for the store attributes, once this is resolved, I believe we're good to go.
The rest is minor nits and simplification of the code.
Nice new coverage with new snapshot tests, this is really great to see! 👌
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| # TODO: | ||
| raise InvalidParameterException("Fix this Exception message and type") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
note for later: this is about idempotency when creating, right? This was pretty tricky for subscriptions, might be worth looking into subscribe to see if we can take some things from there 👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| topics = {"Topics": [{"TopicArn": t.arn} for t in store.topics.values()]} | ||
| topics = PaginatedList(topics["Topics"]) | ||
| page, nxt = topics.get_page( | ||
| lambda topic: topic["TopicArn"], next_token=next_token, page_size=100 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit: using the topic ARN as the pagination token might be a bit of an issue (some client might not handle the arn format for that), but this can left as is for now, just a thought
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Currently, only patch changes are allowed on main. Your PR labels (semver: minor, docs: skip) indicate that it cannot be merged into the main at this time. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice, this is great!
Thanks for addressing the comments, I believe there are only a few left and then we're good to merge 👍
It would be good to move the CreateTopic logic in the operation so that it's clearer where it is applied, and remove some redundant attributes of the topic.
The rest are questions, nits and thoughts about cross-region topic access that we will need to consider.
Once the CreateTopic logic has been cleaned up, we're good to merge 👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| """ | ||
| :param arn: the Topic ARN | ||
| :param context: the RequestContext of the request | ||
| :return: the Moto model Topic |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit: comment: not the Moto model anymore
2nd comment: we will want to add the multi region flag sooner than later I believe, because right now we changed the behavior to raise an exception if the region of the request is different from the ARN, but this not should not be the default behavior for many operations. Just need to be kept in mind for the follow-up PRs
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM! thanks for addressing the comments! this is good to go, my comments are mostly about keeping tracks of some things to fix in follow-ups 👍 this looks great, thanks a lot 🙏
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| { | ||
| "ContentBasedDeduplication": "false", | ||
| "FifoTopic": "false", | ||
| "SignatureVersion": "2", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit: I think this is an oversight from the test, looking at all our tests, they all set the SignatureVersion to 2 when creating a fifo topic.
But looking at AWS, it doesn't seem like it sets this attribute by default:
$ aws us-east-1 sns create-topic --name test-topic.fifo --attributes FifoTopic=true
{
"TopicArn": "arn:aws:sns:us-east-1:<account-id>:test-topic.fifo"
}
$ aws sns get-topic-attributes --topic-arn arn:aws:sns:us-east-1:<account-id>:test-topic.fifo
{
"Attributes": {
"Policy": "{\"Version\":\"2008-10-17\",\"Id\":\"__default_policy_ID\",\"Statement\":[{\"Sid\":\"__default_statement_ID\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"*\"},\"Action\":[\"SNS:GetTopicAttributes\",\"SNS:SetTopicAttributes\",\"SNS:AddPermission\",\"SNS:RemovePermission\",\"SNS:DeleteTopic\",\"SNS:Subscribe\",\"SNS:ListSubscriptionsByTopic\",\"SNS:Publish\"],\"Resource\":\"arn:aws:sns:us-east-1:<account-id>:test-topic.fifo\",\"Condition\":{\"StringEquals\":{\"AWS:SourceOwner\":\"<account-id>\"}}}]}",
"Owner": "<account-id>",
"SubscriptionsPending": "0",
"TopicArn": "arn:aws:sns:us-east-1:<account-id>:test-topic.fifo",
"EffectiveDeliveryPolicy": "{\"http\":{\"defaultHealthyRetryPolicy\":{\"minDelayTarget\":20,\"maxDelayTarget\":20,\"numRetries\":3,\"numMaxDelayRetries\":0,\"numNoDelayRetries\":0,\"numMinDelayRetries\":0,\"backoffFunction\":\"linear\"},\"disableSubscriptionOverrides\":false,\"defaultRequestPolicy\":{\"headerContentType\":\"text/plain; charset=UTF-8\"}}}",
"SubscriptionsConfirmed": "0",
"FifoTopic": "true",
"DisplayName": "",
"ContentBasedDeduplication": "false",
"SubscriptionsDeleted": "0"
}
}But this is a nit, not blocking, something to consider to remove in a follow-up PR 👍 let's get this one merged! Sorry I missed it earlier
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # Invalid chars | ||
| for c in [":", ";", "!", "@", "|", "^", "%", " "]: | ||
| with pytest.raises(ClientError) as e: | ||
| sns_create_topic(Name=f"bad{c}name") | ||
| snapshot.match(f"name-invalid-char-{c}", e.value.response) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
question: it looks like the snapshot issue we discussed this morning is not part of the PR, will it be part of a follow-up? Not worries, not blocking either, I was wondering 😄
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
works against v2 🤷
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @markers.snapshot.skip_snapshot_verify( | ||
| paths=[ | ||
| "$..Attributes.EffectiveDeliveryPolicy", | ||
| ] | ||
| ) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
something I missed earlier too: it would be great to implement this default EffectiveDeliveryPolicy in a follow-up PR if we could keep track of it, as it is used in Publish to determine which content type to use for HTTP subscriptions. Not to be implemented in this PR either, this is just to keep track of it and remove in a follow-up for v2 👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.