-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
allow aws sdk v3 #381
allow aws sdk v3 #381
Conversation
Hi @rsharrott Is there an ETA for v3? |
SDK V3 release candidates are already available. The basic idea is to split the SDK to multiple gems so we can select only the aws services we actually use and reduce the number of dependencies. More details here: https://aws.amazon.com/blogs/developer/aws-sdk-for-ruby-modularization-version-3-2/ This PR simply allows people who are using SDK V3 to use recent versions of shoryuken. The current gemfile restricts to SDK V2 so I changed it to allow V2 or V3. |
@rsharrott cool. I will test it out. Have you tested it with Shoryuken? I'm wondering if there's any breaking change.
Based on what they say, it should be just a bump. |
I'm running it in production now and have not seen any issues. |
@phstc Do you think this can be merged? I was trying to use Thanks @rsharrott for the PR! |
@rsharrott @oyeanuj merged. We will need to pay attention in case |
@rsharrott @oyeanuj I had to revert the aws-sdk change, since v3 does not work with Shoryuken, as @ota42y pointed out here. With v3:
For making it compatible with v3, we would need something like this: spec.add_dependency 'aws-sdk-core', '>= 2'
if Aws::VERSION >= 3 # not sure how to do this if
spec.add_dependency 'aws-sdk-sqs', '~> 1'
end
# shoryuken.rb
require 'aws-sdk-core'
if Aws::VERSION >= 3 # not sure how to do this if
require 'aws-sdk-sqs'
end Any thoughts? cc/ @pyromaniac |
Yeah, that's exactly what we need, but unfortunately, I don't see a way to do it. Instead, we can try to do it like this: if Aws::VERSION >= 3 # not sure how to do this if
begin
require 'aws-sdk-sqs'
rescue LoadError
puts "Aws 3 requires `aws-sdk-sqs` to be installed separately. Please add `gem 'aws-sdk-sqs'`
to your Gemfile".
end
end And probably, they didn't update the version lol https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-core/lib/aws-sdk-core/version.rb |
@phstc Just so I am understanding correctly, |
@oyeanuj Shoryuken runs fine with aws-sdk-core 2, but for 3 it needs @pyromaniac I think it's a great idea, I will play with it. |
@pyromaniac I think I got a fix based on your snippet (great idea 🍻) WDYT #433? |
Probably should go and define the specific gems in use once sdk v3 is released.