Skip to content
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

Support Ruby 3.0 or later #388

Merged
merged 3 commits into from
Apr 19, 2022
Merged

Support Ruby 3.0 or later #388

merged 3 commits into from
Apr 19, 2022

Conversation

ashie
Copy link
Member

@ashie ashie commented Jan 26, 2022

Signed-off-by: Takuro Ashie [email protected]

@ashie
Copy link
Member Author

ashie commented Jan 26, 2022

Failed to load aws-sdk-core on Ruby 3.x.

Using fluent-plugin-s3 1.6.1 from source at `.`
Bundle complete! 5 Gemfile dependencies, 28 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
/opt/hostedtoolcache/Ruby/3.1.0/x64/bin/ruby -w -I"lib:lib:test" /opt/hostedtoolcache/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb "test/test_in_s3.rb" "test/test_out_s3.rb" 
/opt/hostedtoolcache/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/aws-sdk-core-3.125.5/lib/aws-sdk-core/xml/parser.rb:74:in `set_default_engine': Unable to find a compatible xml library. Ensure that you have installed or added to your Gemfile one of ox, oga, libxml, nokogiri or rexml (RuntimeError)

It's caused by aws/aws-sdk-ruby@cc06703#diff-a9af0bc706c822e7c90ca01122dfac7e0a877a69346c5ae5f805839363aa3d18

It will be removed in the next release: aws/aws-sdk-ruby@64e9ea9#diff-a9af0bc706c822e7c90ca01122dfac7e0a877a69346c5ae5f805839363aa3d18

Signed-off-by: Takuro Ashie <[email protected]>
@ashie
Copy link
Member Author

ashie commented Apr 18, 2022

It's caused by aws/aws-sdk-ruby@cc06703#diff-a9af0bc706c822e7c90ca01122dfac7e0a877a69346c5ae5f805839363aa3d18

It will be removed in the next release: aws/aws-sdk-ruby@64e9ea9#diff-a9af0bc706c822e7c90ca01122dfac7e0a877a69346c5ae5f805839363aa3d18

Sorry, it's wrong.

The correct cause is that rexml isn't default gem anymore as of 3.0, it's a "bundled gem":
https://www.ruby-lang.org/en/news/2020/09/25/ruby-3-0-0-preview1-released/
So that we need to add it to Gemfile or gemspec explicitly.

ashie added 2 commits April 18, 2022 22:09
aws-sdk-core requires one of ox, oga, libxml, nokogiri or rexml, and
rexml is no longer default gem as of Ruby 3.0, it's a "bundled gem".

https://www.ruby-lang.org/en/news/2020/09/25/ruby-3-0-0-preview1-released/

Signed-off-by: Takuro Ashie <[email protected]>
@ashie ashie changed the title CI: Update Ruby Support Ruby 3.0 or later Apr 18, 2022
@ashie
Copy link
Member Author

ashie commented Apr 18, 2022

And out_s3 had incompatible issue against Ruby 3.0 or later... 0c63d26

@ashie ashie requested a review from cosmo0920 April 18, 2022 13:15
Copy link
Contributor

@cosmo0920 cosmo0920 left a comment

Choose a reason for hiding this comment

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

Seems reasonable. Thanks!

@ashie ashie merged commit db7fa62 into master Apr 19, 2022
@ashie ashie deleted the ci-update-ruby branch April 19, 2022 06:19
ashie added a commit that referenced this pull request Apr 19, 2022
`Aws::AssumeRoleCredentials.new` and
Aws::AssumeRoleWebIdentityCredentials.new` are expects a hash argument,
not kwargs. Tests for them were wrong, not the implementation.

https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/AssumeRoleCredentials.html#initialize-instance_method
https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/AssumeRoleWebIdentityCredentials.html#initialize-instance_metho

Signed-off-by: Takuro Ashie <[email protected]>
ashie added a commit that referenced this pull request Apr 19, 2022
`Aws::AssumeRoleCredentials.new` and
Aws::AssumeRoleWebIdentityCredentials.new` expect a hash argument,
not kwargs. Tests for them were wrong, not the implementation.

https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/AssumeRoleCredentials.html#initialize-instance_method
https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/AssumeRoleWebIdentityCredentials.html#initialize-instance_metho

Signed-off-by: Takuro Ashie <[email protected]>
ashie added a commit that referenced this pull request Apr 19, 2022
`Aws::AssumeRoleCredentials.new` and
`Aws::AssumeRoleWebIdentityCredentials.new` expect a hash argument,
not kwargs. Tests for them were wrong, not the implementation.

https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/AssumeRoleCredentials.html#initialize-instance_method
https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/AssumeRoleWebIdentityCredentials.html#initialize-instance_metho

Signed-off-by: Takuro Ashie <[email protected]>
ashie added a commit that referenced this pull request Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants