Skip to content

Commit

Permalink
[Ruby] update bundle before building the native lib (grpc#38303)
Browse files Browse the repository at this point in the history
fixes grpc#38298

What happened was that
in the rake dock container, Bundler version is 2.6.0;
but on the CI host, Bundler version is 2.5.3
When starting the container, Gemfile.lock is mounted to the container as well, which causes in version compatibility issues when it tries to switch back to 2.5.3 in the container.
This PR runs bundle update in the container to reconcile the versions of bundler and other germs so the build can succeed.

```
Bundler 2.6.0 is running, but your lockfile was generated with 2.5.3. Installing Bundler 2.5.3 and restarting using that version.
Fetching gem metadata from [https://rubygems.org/](https://www.google.com/url?q=https://rubygems.org/&sa=D).
Fetching bundler 2.5.3
Installing bundler 2.5.3
```

Closes grpc#38303

COPYBARA_INTEGRATE_REVIEW=grpc#38303 from alto-ruby:fix-distribution-tests-ruby-linux 1efc15e
PiperOrigin-RevId: 707932172
  • Loading branch information
alto-ruby authored and copybara-github committed Dec 19, 2024
1 parent 4a72b88 commit c4ce477
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ task 'gem:native', [:plat] do |t, args|
run_rake_compiler(plat, <<~EOT)
#{prepare_ccache_cmd} && \
gem update --system --no-document && \
bundle && \
bundle update && \
bundle exec rake clean && \
bundle exec rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \
RUBY_CC_VERSION=#{ruby_cc_versions} \
Expand Down Expand Up @@ -216,7 +216,7 @@ task 'gem:native', [:plat] do |t, args|
run_rake_compiler(plat, <<~EOT)
#{prepare_ccache_cmd} && \
gem update --system --no-document && \
bundle && \
bundle update && \
bundle exec rake clean && \
export GRPC_RUBY_DEBUG_SYMBOLS_OUTPUT_DIR=#{debug_symbols_dir} && \
bundle exec rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \
Expand Down

0 comments on commit c4ce477

Please sign in to comment.