-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix SNS throttling error finding SNS topics #96
base: master
Are you sure you want to change the base?
Conversation
Move both files to the project root. Remove specific gem versions from Dockerfile, and rely on those specified in the gemspec and Gemfile. Fix path in GitHub Actions workflow after moving docker-compose.yml.
Use the `Aws::SNS::Resource#topics` to search the topics instead of the `Aws::SNS::Client#list_topics`. This should hopefully remove the intermittent AWS SNS throttling error seen on deployment.
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.
I'm not convinced this will resolve rate limiting, but it's neater.
It's calling sns.list_topics
and handling the pagination, without any rate limit handling from what I can see.
.github/workflows/rspec.yml
Outdated
docker-compose up -d | ||
docker exec testrunner bash -c "cd src && bundle install && bundle exec rspec && exit" | ||
docker-compose up -d --build | ||
docker exec testrunner bash -c "bundle exec rspec && exit" |
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.
Is && exit
here to try and control the exit code?
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.
I don't know TBH 🤷♂️
I did change this to use docker-compose run
in dae4e9e instead.
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.
Ah yeah, it would have been due to using docker exec, to exit the container.
The `client` passed to the constructor looks like it'll be an eventq `AwsQueueClient` rather than an AWS SNS client. So create the `Resource` using that client's `#sns` method.
This reverts commit 68c96de.
Use the given argument or create a new `Resource`.
Replace the
Aws::SNS::Client#list_topics
call withAws::SNS::Resource#topics
when iterating through topics.The former can be subject to rate limiting, whereas the documentation for the latter makes no mention of it being subject to rate limiting.
Also: