-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Update resource_aws_sns_topic_subscription to create the subscription… #10496
Update resource_aws_sns_topic_subscription to create the subscription… #10496
Conversation
… attributes simulatenously with the general subscription creation Previously the attributes were created _after_ the subscription was created. This left a few seconds in time where messages from the topic could make it through to the endpoint without adhering to things like the FilterPolicy and the RawMessageDelivery flag.
I believe the issues I faced running the tests in parallel were localized to my machine. The tests passed successfully on the automated build server. |
If I'm understand this PR correctly, the flow (before these changes) looked like this So that's 4 separate requests to subscribe and create subscription attributes. The idea then is that, in high traffic environments, messages might be delivered before the requests for limiting attributes (e.g. This PR just simplifies the creation-path to the following which should subscribe and create the limiting attributes atomically. Is there still an issue (with atomic updates) when just an update occurs since the update-path still makes multiple calls? |
Moreover, it's hard to say how long these requests actually take since all kinds of "eventually consistency" is at play here. |
@mjgpy3 Yes, your explanation and diagrams are correct. It's all about doing the request once with exactly what the user wants rather than pieces of what they want until it finally comes together. You bring up a good point about the update-path that I hadn't noticed. As it is currently, it could potentially cause problems if someone needed more than one attribute changed at the same time. That should probably be changed as well. |
@mjgpy3 I got around to looking into the update-path question and it looks like it has to be done in multiple calls. The set-subscription-attributes command doesn't support updating multiple attributes at once. So I think the changes as they are now is about as good as the current CLI can do. |
Thanks for looking into that, @carlos-zaragoza. |
Hi, Has there been any progress on getting this change in? We're having the same issues as #10495 |
@mike-dazn I've yet to hear from the maintainers presumably because the issue and the PR are too far down the list when sorting by community reactions (👍). Please make sure to leave a 👍 reaction on both to bump them higher in the priority list if this change would help you. |
Hi can we get some sort of update on this getting through? It's been quite a while. |
Just want to add some more noise to this, would be great to see this make some progress! Would be very useful for us. |
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.
Apologies for the delayed review, @carlos-zaragoza, this looks good to me. 🚀
Output from acceptance testing in AWS Commercial:
--- PASS: TestAccAWSSNSTopicSubscription_basic (18.88s)
--- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (42.59s)
--- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (43.36s)
--- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (43.50s)
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (46.81s)
--- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (86.36s)
Output from acceptance testing in AWS GovCloud (US) (test failures unrelated due to API Gateway setup in testing configuration):
--- PASS: TestAccAWSSNSTopicSubscription_basic (17.55s)
--- FAIL: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (20.69s)
--- FAIL: TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint (27.48s)
--- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (35.59s)
--- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (36.02s)
--- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (36.23s)
This has been released in version 3.10.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
… attributes simulatenously with the general subscription creation
Previously the attributes were created after the subscription was created. This left a few seconds in time where messages from the topic could make it through to the endpoint without adhering to things like the FilterPolicy and the RawMessageDelivery flag.
Community Note
Relates OR Closes #10495
Release note for CHANGELOG:
Output from acceptance testing:
When I run the tests one at a time, they pass successfully. The tests also pass when run concurrently on the automated build server.
I have issues running the tests concurrently on my machine but the issue happens both on this branch and on master so I believe this issue is a problem with my local environment.
For completeness' sake, I've included the test results of running both concurrently and running one at a time. They are listed separately below.
Results of running all the tests one at a time.