[Ruby 3.0] Migrate google-api-client gem and drop Ruby 2.4#18656
[Ruby 3.0] Migrate google-api-client gem and drop Ruby 2.4#18656joshdholtz merged 8 commits intofix-minor-deprecationfrom
Conversation
d18a329 to
5ab5d4b
Compare
5ab5d4b to
7e7c687
Compare
22a50f5 to
b5d76dc
Compare
| @@ -103,8 +103,9 @@ Gem::Specification.new do |spec| | |||
|
|
|||
| # The Google API Client gem is *not* API stable between minor versions - hence the specific version locking here. | |||
| # If you upgrade this gem, make sure to upgrade the users of it as well. | |||
There was a problem hiding this comment.
Do you know that? 😂 I couldn't find the statement that those gems follow the semantic versioning.
There was a problem hiding this comment.
But there's no reason to keep them as is. Will revise it.
There was a problem hiding this comment.
I don't know whether the new gems are intended to use semantic versioning. I only noticed that these are no longer version locked.
There was a problem hiding this comment.
That's right! Thanks.
There was a problem hiding this comment.
Obviously these are different ecosystems, but if the versions line up at all, at least for javascript the google-apis follows semantic versioning, but it's essentially nothing but major versions because of it - there is always some API changing incompatibly: https://github.com/googleapis/google-api-nodejs-client/blob/master/CHANGELOG.md
There was a problem hiding this comment.
I ended up removing the comment.
As far as I read this thread, they can publish any breaking changes within pre-1.0 version technically.
googleapis/google-api-ruby-client#833 (comment)
That said since they split the gem, it's easy to assume that there are fewer likely breaking changes than before. Their typical breaking changes were removals by APIs; for example, below changelog, which now are split into each gem. If the removal happens, it will appear as the gem's error, which we won't be able to prevent anyway unless we keep catching up with their changes.
Breaking changes:
Deleted androidpublisher_v1_1
Deleted androidpublisher_v2
https://github.com/googleapis/google-api-ruby-client/blob/master/google-api-client/CHANGELOG.md#0420
So my conclusion is to not strict about minor version updates and to keep eyes on their changes. There are new changelog files for each gem as well. We can check them when needed.
https://github.com/googleapis/google-api-ruby-client/blob/master/generated/google-apis-playcustomapp_v1/CHANGELOG.md
https://github.com/googleapis/google-api-ruby-client/blob/master/generated/google-apis-androidpublisher_v3/CHANGELOG.md
|
@ainame The title of this PR says “drop Ruby 2.5” but its supposed to say “drop Ruby 2.4”, right? 😇 |
|
@joshdholtz That's right🙈 I fixed it. |
joshdholtz
left a comment
There was a problem hiding this comment.
This is the one!!! 🎊 I pulled this down and ran some tests on supply to make sure we are good and it seems like everything still works as it should 🤷♂️ Let's ship this!
* Migrate google-api-client to split gems * Officially support Ruby 3.0 and drop Ruby 2.5 support * Enable Ruby 3.0 check * Set 2.5 to Rubocop TagetRubyVersion * Apply Style/HashTransformKeys and Style/SymbolProc cop correction * Apply Performance/RedundantEqualityComparisonBlock correction * Update google-cloud-storage to the latest for Ruby 3.0 * Removed unnecessary comment
…18689) * Migrate google-api-client to split gems * Officially support Ruby 3.0 and drop Ruby 2.5 support * Enable Ruby 3.0 check * Set 2.5 to Rubocop TagetRubyVersion * Apply Style/HashTransformKeys and Style/SymbolProc cop correction * Apply Performance/RedundantEqualityComparisonBlock correction * Update google-cloud-storage to the latest for Ruby 3.0 * Removed unnecessary comment Co-authored-by: Satoshi Namai <s.namai.09@gmail.com>
fastlane-bot
left a comment
There was a problem hiding this comment.
Congratulations! 🎉 This was released as part of fastlane 2.183.0 🚀
Checklist
bundle exec rspecfrom the root directory to see all new and existing tests passbundle exec rubocop -ato ensure the code style is validMotivation and Context
As per plan #17931, I've been working on Ruby 3.0 support. Prior to this PR, I have done the followings -
This PR finally unblocks Ruby 3.0 installation by migrating
google-api-clientgem to new ones that support Ruby 3.0. I also enabled CI checks with Ruby 3.0 on CircleCI, which requires us to install it manually as they haven't released a new macOS image with Xcode 12.5 that is supposed to bundle it.After this PR gets merged, we are going to be ready to release the new version that officially supports Ruby 3.0 and drop Ruby 2.4 support at the same time.
Description
https://github.com/googleapis/google-api-ruby-client/blob/master/google-api-client/OVERVIEW.md
google-api-clientis now split by service. (Just like AWS did for aws-sdk-ruby v3!). We can install only what we use. For fastlane we only usegoogle-apis-playcustomapp_v1andgoogle-apis-androidpublisher_v3. I put them in gemspec.google-cloud-storageis more like a higher abstracted library to interact with Cloud Storage. It depends ongoogle-apis-iamcredentials_v1andgoogle-apis-storage_v1internally.As far as I read changelog files, there's no breaking change in those four services
playcustomapp_v1,androidpublisher_v3,google-apis-iamcredentials_v1andgoogle-apis-storage_v1(sincegoogle-api-client 0.37.0) andgoogle-cloud-storage(sicne1.15).Links
https://github.com/googleapis/google-api-ruby-client/blob/master/google-api-client/CHANGELOG.md
https://github.com/googleapis/google-cloud-ruby/blob/master/google-cloud-storage/CHANGELOG.md#1310--2021-03-10
That change only broke a test case that stub API requests. The gem changed the hostname of API once apparently.
Testing Steps
Try supply. I personally have never used supply or Android related actions. I appreciate if people try to use this branch for testing 😂