Bug #17863

Use bundler 2.2.19 consistently

Added by Peter Amstutz 3 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Deployment
Target version:
Start date:
07/19/2021
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-

Subtasks

Task #17868: ReviewResolvedWard Vandewege

Associated revisions

Revision e1cee0a8
Added by Ward Vandewege 2 months ago

Merge branch '17863-bundler-update'

closes #17863

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <>

History

#1 Updated by Peter Amstutz 3 months 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.

#2 Updated by Peter Amstutz 3 months ago

  • Assigned To set to Ward Vandewege

#3 Updated by Ward Vandewege 2 months ago

  • Status changed from New to In Progress

#4 Updated by Ward Vandewege 2 months ago

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

Tests have passed at https://ci.arvados.org/view/Developer/job/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.

#5 Updated by Peter Amstutz 2 months ago

Ward Vandewege wrote:

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

Tests have passed at https://ci.arvados.org/view/Developer/job/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

#6 Updated by Peter Amstutz 2 months 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 ?

#7 Updated by Peter Amstutz 2 months ago

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

#8 Updated by Ward Vandewege 2 months 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 https://ci.arvados.org/view/Developer/job/developer-build-packages-multijob/2/

#9 Updated by Peter Amstutz 2 months 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 https://ci.arvados.org/view/Developer/job/developer-build-packages-multijob/2/

The rest of this LGTM.

#10 Updated by Ward Vandewege 2 months 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 https://ci.arvados.org/view/Developer/job/developer-build-packages-multijob/2/

The rest of this LGTM.

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

#11 Updated by Ward Vandewege 2 months ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF