Project

General

Profile

Actions

Bug #17863

closed

Use bundler 2.2.19 consistently

Added by Peter Amstutz over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Deployment
Target version:
Story points:
-
Release relationship:
Auto

Subtasks 1 (0 open1 closed)

Task #17868: ReviewResolvedWard Vandewege07/19/2021Actions
Actions #1

Updated by Peter Amstutz over 2 years ago

grep --color -nHr -e bundler

run-tests.sh:520:        (bundle version | grep -q 2.0.2) || gem install bundler -v 2.0.2
run-tests.sh:523:        "$bundle" version | grep 2.0.2 || fatal 'install bundler'
run-tests.sh:547:        echo "Will install bundler and arvados gems to $tmpdir_gem_home" 
run-tests.sh:552:            bundlers="$(gem list --details bundler)" 
run-tests.sh:555:                if ! echo "$bundlers" | fgrep -q "($v)"; then
run-tests.sh:556:                    gem install --user $(for v in ${versions[@]}; do echo bundler:${v}; done)
run-tests.sh:561:        ) || fatal 'install bundler'
rails-package-scripts/postinst.sh:202:      run_and_report "Installing bundler" $COMMAND_PREFIX gem install bundler --version 1.17.3
package-build-dockerfiles/centos7/Dockerfile:19:    /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2 && \
package-build-dockerfiles/ubuntu2004/Dockerfile:24:    /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2 && \
package-build-dockerfiles/ubuntu1604/Dockerfile:24:    /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2 && \
package-build-dockerfiles/debian8/Dockerfile:26:    /usr/local/rvm/bin/rvm-exec default gem install bundler && \
package-build-dockerfiles/debian10/Dockerfile:25:    /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2 && \
package-build-dockerfiles/ubuntu1804/Dockerfile:24:    /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2 && \
package-build-dockerfiles/ubuntu1404/Dockerfile:24:    /usr/local/rvm/bin/rvm-exec default gem install bundler && \
package-test-dockerfiles/centos7/Dockerfile:20:    /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2
package-test-dockerfiles/ubuntu2004/Dockerfile:22:    /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2
package-test-dockerfiles/ubuntu1604/Dockerfile:22:    /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2
package-test-dockerfiles/debian10/Dockerfile:22:    /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2
package-test-dockerfiles/ubuntu1804/Dockerfile:22:    /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2

We support Ruby 2.7.2, the version of bundler associated with that seems to be 2.2.19.

Actions #2

Updated by Peter Amstutz over 2 years ago

  • Assigned To set to Ward Vandewege
Actions #3

Updated by Ward Vandewege over 2 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Ward Vandewege over 2 years ago

Ready for review at 8e7674794c36d5baaf72486ca60b3e93aae83f0b on branch 17863-bundler-update.

Tests have passed at developer-run-tests: #2591 .

I've run the package build + test for Debian 10, CentOS 7, Ubuntu 18.04 and 20.04 locally, no errors.

Actions #5

Updated by Peter Amstutz over 2 years ago

Ward Vandewege wrote:

Ready for review at 8e7674794c36d5baaf72486ca60b3e93aae83f0b on branch 17863-bundler-update.

Tests have passed at developer-run-tests: #2591 .

I've run the package build + test for Debian 10, CentOS 7, Ubuntu 18.04 and 20.04 locally, no errors.

LGTM

Actions #6

Updated by Peter Amstutz over 2 years ago

From discussion:

Rails has its own bin/bundle, so maybe we should be using that one instead of the system bundler?
We shouldn't run "bundle rails" we should just run "rails", it loads its own version of bundler ?

Actions #7

Updated by Peter Amstutz over 2 years ago

  • Target version changed from 2021-07-21 sprint to 2021-08-04 sprint
Actions #8

Updated by Ward Vandewege over 2 years ago

Peter Amstutz wrote:

From discussion:

Rails has its own bin/bundle, so maybe we should be using that one instead of the system bundler?
We shouldn't run "bundle rails" we should just run "rails", it loads its own version of bundler ?

To be clear: rails 5 brought 'binstubs', like `bin/bundle` and `bin/rake` and `bin/rails`. They all load the right bundle environment and then call the correct command. The `bin/bundle` command still relies on (the correct version of) bundle to be present. As part of our `postinst.sh` script in the rails packages we install bundle 2.2.19 if bundle is not present.

I've pushed a commit that changes `bundle exec rake` to `bin/rake`, `bundle exec rails` to `bin/rails`, etc. Most of these were in the documentation (note that I did leave the old `bundle exec rake` calls alone in the upgrade guide, because those could be run from an older package that didn't have the binstubs yet). There were also a number of calls to `bundle exec rake` in the build scripts, which I have updated as well.

Ready for another look at e3892bc5a88b810218ebdb564283e6f459ce4df3, which only changes the `build` and `doc` directories, package build/test passed at developer-build-packages-multijob: #2

Actions #9

Updated by Peter Amstutz over 2 years ago

Ward Vandewege wrote:

Peter Amstutz wrote:

From discussion:

Rails has its own bin/bundle, so maybe we should be using that one instead of the system bundler?
We shouldn't run "bundle rails" we should just run "rails", it loads its own version of bundler ?

To be clear: rails 5 brought 'binstubs', like `bin/bundle` and `bin/rake` and `bin/rails`. They all load the right bundle environment and then call the correct command. The `bin/bundle` command still relies on (the correct version of) bundle to be present. As part of our `postinst.sh` script in the rails packages we install bundle 2.2.19 if bundle is not present.

I've pushed a commit that changes `bundle exec rake` to `bin/rake`, `bundle exec rails` to `bin/rails`, etc. Most of these were in the documentation (note that I did leave the old `bundle exec rake` calls alone in the upgrade guide, because those could be run from an older package that didn't have the binstubs yet). There were also a number of calls to `bundle exec rake` in the build scripts, which I have updated as well.

The changes to doc/README.textile don't seem right. That's describing how to build the docs themselves, not how to run Arvados. The docs use their own Gemfile / version of rake which is entirely separate from Rails, I don't know if it makes sense to use the binstub in this case.

Ready for another look at e3892bc5a88b810218ebdb564283e6f459ce4df3, which only changes the `build` and `doc` directories, package build/test passed at developer-build-packages-multijob: #2

The rest of this LGTM.

Actions #10

Updated by Ward Vandewege over 2 years ago

Peter Amstutz wrote:

Ward Vandewege wrote:

Peter Amstutz wrote:

From discussion:

Rails has its own bin/bundle, so maybe we should be using that one instead of the system bundler?
We shouldn't run "bundle rails" we should just run "rails", it loads its own version of bundler ?

To be clear: rails 5 brought 'binstubs', like `bin/bundle` and `bin/rake` and `bin/rails`. They all load the right bundle environment and then call the correct command. The `bin/bundle` command still relies on (the correct version of) bundle to be present. As part of our `postinst.sh` script in the rails packages we install bundle 2.2.19 if bundle is not present.

I've pushed a commit that changes `bundle exec rake` to `bin/rake`, `bundle exec rails` to `bin/rails`, etc. Most of these were in the documentation (note that I did leave the old `bundle exec rake` calls alone in the upgrade guide, because those could be run from an older package that didn't have the binstubs yet). There were also a number of calls to `bundle exec rake` in the build scripts, which I have updated as well.

The changes to doc/README.textile don't seem right. That's describing how to build the docs themselves, not how to run Arvados. The docs use their own Gemfile / version of rake which is entirely separate from Rails, I don't know if it makes sense to use the binstub in this case.

Right! I've reverted the changes to this file.

Ready for another look at e3892bc5a88b810218ebdb564283e6f459ce4df3, which only changes the `build` and `doc` directories, package build/test passed at developer-build-packages-multijob: #2

The rest of this LGTM.

Thanks, merged as 32e1a62223130822eaac3ebdef942a44102184b9 which reverts the changes to doc/README.textile.

Actions #11

Updated by Ward Vandewege over 2 years ago

  • Status changed from In Progress to Resolved
Actions #12

Updated by Peter Amstutz over 2 years ago

  • Release set to 42
Actions

Also available in: Atom PDF