From e74eb4ee32d3d88ed4b7b2295207ffb0a027cea7 Mon Sep 17 00:00:00 2001 From: Dombi Attila <83396+dombesz@users.noreply.github.com> Date: Wed, 13 Dec 2023 17:01:37 +0200 Subject: [PATCH 1/2] Bump ruby to 3.2.2 & bundler to 2.4.22 --- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 4 ++-- docker/ci/Dockerfile | 2 +- docker/dev/backend/Dockerfile | 4 ++-- docker/prod/Dockerfile | 2 +- .../development-environment-docker/README.md | 2 +- .../development-environment-osx/README.md | 12 ++++++------ .../development-environment-ubuntu/README.md | 12 ++++++------ .../installation/manual/README.md | 6 +++--- script/github_pr_errors | 2 +- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.ruby-version b/.ruby-version index e4604e3afd0d..be94e6f53db6 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.1 +3.2.2 diff --git a/Gemfile b/Gemfile index df4a025739b4..af56fa074d99 100644 --- a/Gemfile +++ b/Gemfile @@ -28,7 +28,7 @@ source 'https://rubygems.org' -ruby '~> 3.2.1' +ruby file: '.ruby-version' gem 'actionpack-xml_parser', '~> 2.0.0' gem 'activemodel-serializers-xml', '~> 1.0.1' diff --git a/Gemfile.lock b/Gemfile.lock index b2173631c379..6498c473877e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1253,7 +1253,7 @@ DEPENDENCIES with_advisory_lock (~> 5.0.0) RUBY VERSION - ruby 3.2.1p31 + ruby 3.2.2p53 BUNDLED WITH - 2.4.7 + 2.4.22 diff --git a/docker/ci/Dockerfile b/docker/ci/Dockerfile index d44fb690c180..9364e6669276 100644 --- a/docker/ci/Dockerfile +++ b/docker/ci/Dockerfile @@ -3,7 +3,7 @@ ARG RUBY_VERSION FROM ruby:${RUBY_VERSION}-bullseye ENV NODE_VERSION="20.9.0" -ENV BUNDLER_VERSION="2.4.21" +ENV BUNDLER_VERSION="2.4.22" ENV DEBIAN_FRONTEND=noninteractive ENV BUNDLE_WITHOUT="development:production:docker" diff --git a/docker/dev/backend/Dockerfile b/docker/dev/backend/Dockerfile index 7a2856046693..f8b119205763 100644 --- a/docker/dev/backend/Dockerfile +++ b/docker/dev/backend/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.2.1-bullseye as develop +FROM ruby:3.2.2-bullseye as develop MAINTAINER operations@openproject.com ARG DEV_UID=1000 @@ -8,7 +8,7 @@ ENV USER=dev ENV RAILS_ENV=development ENV NODE_MAJOR=20 -ENV BUNDLER_VERSION "2.4.7" +ENV BUNDLER_VERSION "2.4.22" # `--no-log-init` is required as a workaround to avoid disk exhaustion. # diff --git a/docker/prod/Dockerfile b/docker/prod/Dockerfile index 5ed2b9bf458f..ade8dab88a2c 100644 --- a/docker/prod/Dockerfile +++ b/docker/prod/Dockerfile @@ -1,6 +1,6 @@ ARG RUBY_VERSION="3.2.2" ARG NODE_VERSION="20.9.0" -ARG BUNDLER_VERSION="2.4.7" +ARG BUNDLER_VERSION="2.4.22" ARG DEBIAN_FRONTEND=noninteractive # ------------------------------------- diff --git a/docs/development/development-environment-docker/README.md b/docs/development/development-environment-docker/README.md index f6678caca7e9..0ddce05c1725 100644 --- a/docs/development/development-environment-docker/README.md +++ b/docs/development/development-environment-docker/README.md @@ -431,7 +431,7 @@ Ruby version is updated you may run into an error like the following when running `docker compose run --rm backend setup`: ``` -Your Ruby version is 2.7.6, but your Gemfile specified ~> 3.2.1 +Your Ruby version is 2.7.6, but your Gemfile specified ~> 3.2.2 ``` This means that the current image is out-dated. You can update it like this: diff --git a/docs/development/development-environment-osx/README.md b/docs/development/development-environment-osx/README.md index aa741ac233d1..1afe3d8c8e1a 100644 --- a/docs/development/development-environment-osx/README.md +++ b/docs/development/development-environment-osx/README.md @@ -22,7 +22,7 @@ We'll use [homebrew](https://brew.sh/) to install most of our requirements. Plea ## Install Ruby -Use [rbenv](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build#readme) to install Ruby. We always require the latest ruby versions, and you can check which version is required by [checking the Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile#L31) for the `ruby "~> X.Y"` statement. At the time of writing, this version is "3.2.1" +Use [rbenv](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build#readme) to install Ruby. We always require the latest ruby versions, and you can check which version is required by [checking the Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile#L31) for the `ruby "~> X.Y"` statement. At the time of writing, this version is "3.2.2" ### Install rbenv and ruby-build @@ -39,20 +39,20 @@ $ rbenv init ### Installing ruby With both installed, we can now install the actual ruby version. You can check available ruby versions with `rbenv install --list`. -At the time of this writing, the latest stable version is `3.2.1`, which we also require. +At the time of this writing, the latest stable version is `3.2.2`, which we also require. We suggest you install the version we require in the [Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile). Search for the `ruby '~> X.Y.Z'` line and install that version. ```shell # Install the required version as read from the Gemfile -rbenv install 3.2.1 +rbenv install 3.2.2 ``` This might take a while depending on whether ruby is built from source. After it is complete, you need to tell rbenv to globally activate this version ```shell -rbenv global 3.2.1 +rbenv global 3.2.2 ``` You also need to install [bundler](https://github.com/bundler/bundler/), the ruby gem bundler. @@ -123,10 +123,10 @@ You should now have an active ruby and node installation. Verify that it works w ```shell $ ruby --version -ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin22] +ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22] $ bundler --version -Bundler version 2.4.7 +Bundler version 2.4.22 node --version v20.9.0 diff --git a/docs/development/development-environment-ubuntu/README.md b/docs/development/development-environment-ubuntu/README.md index 406730584ff7..1d2e8d6dc535 100644 --- a/docs/development/development-environment-ubuntu/README.md +++ b/docs/development/development-environment-ubuntu/README.md @@ -33,7 +33,7 @@ sudo apt-get install git curl build-essential zlib1g-dev libyaml-dev libssl-dev ## Install Ruby -Use [rbenv](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build#readme) to install Ruby. We always require the latest ruby versions, and you can check which version is required by [checking the Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile#L31) for the `ruby "~> X.Y"` statement. At the time of writing, this version is "3.2.1" +Use [rbenv](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build#readme) to install Ruby. We always require the latest ruby versions, and you can check which version is required by [checking the Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile#L31) for the `ruby "~> X.Y"` statement. At the time of writing, this version is "3.2.2" ### Install rbenv and ruby-build @@ -67,20 +67,20 @@ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build ### Installing ruby With both installed, we can now install ruby. You can check available ruby versions with `rbenv install --list`. -At the time of this writing, the latest stable version is `3.2.1` which we also require. +At the time of this writing, the latest stable version is `3.2.2` which we also require. We suggest you install the version we require in the [Gemfile](https://github.com/opf/openproject/blob/dev/Gemfile). Search for the `ruby '~> X.Y.Z'` line and install that version. ```shell # Install the required version as read from the Gemfile -rbenv install 3.2.1 +rbenv install 3.2.2 ``` This might take a while depending on whether ruby is built from source. After it is complete, you need to tell rbenv to globally activate this version ```shell -rbenv global 3.2.1 +rbenv global 3.2.2 rbenv rehash ``` @@ -166,10 +166,10 @@ You should now have an active ruby and node installation. Verify that it works w ```shell ruby --version -ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux] +ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22] bundler --version -Bundler version 2.4.7 +Bundler version 2.4.22 node --version v16.13.1 diff --git a/docs/installation-and-operations/installation/manual/README.md b/docs/installation-and-operations/installation/manual/README.md index 9d9c125bc3b1..ada34f50e20a 100644 --- a/docs/installation-and-operations/installation/manual/README.md +++ b/docs/installation-and-operations/installation/manual/README.md @@ -108,16 +108,16 @@ time to finish. [openproject@host] source ~/.profile [openproject@host] git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build -[openproject@host] rbenv install 3.2.1 +[openproject@host] rbenv install 3.2.2 [openproject@host] rbenv rehash -[openproject@host] rbenv global 3.2.1 +[openproject@host] rbenv global 3.2.2 ``` To check our Ruby installation we run `ruby --version`. It should output something very similar to: ``` -ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux] +ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22] ``` ## Installation of Node diff --git a/script/github_pr_errors b/script/github_pr_errors index f88114f78539..b9d0d94bc23f 100755 --- a/script/github_pr_errors +++ b/script/github_pr_errors @@ -272,7 +272,7 @@ end # rubocop:disable Layout/LineLength # Looks like this in the job log: -# Process 28: TEST_ENV_NUMBER=28 RUBYOPT=-I/usr/local/bundle/bundler/gems/turbo_tests-3148ae6c3482/lib -r/usr/local/bundle/gems/bundler-2.4.7/lib/bundler/setup -W0 RSPEC_SILENCE_FILTER_ANNOUNCEMENTS=1 /usr/local/bundle/gems/bundler-2.4.7/exe/bundle exec rspec --seed 52674 --format TurboTests::JsonRowsFormatter --out tmp/test-pipes/subprocess-28 --format ParallelTests::RSpec::RuntimeLogger --out spec/support/turbo_runtime_features.log spec/features/api_docs/index_spec.rb spec/features/custom_fields/reorder_options_spec.rb spec/features/projects/projects_portfolio_spec.rb spec/features/projects/template_spec.rb spec/features/versions/edit_spec.rb spec/features/work_packages/details/markdown/description_editor_spec.rb spec/features/work_packages/table/hierarchy/hierarchy_parent_below_spec.rb spec/features/work_packages/table/inline_create/inline_create_refresh_spec.rb spec/features/work_packages/table/invalid_query_spec.rb spec/features/work_packages/tabs/activity_revisions_spec.rb +# Process 28: TEST_ENV_NUMBER=28 RUBYOPT=-I/usr/local/bundle/bundler/gems/turbo_tests-3148ae6c3482/lib -r/usr/local/bundle/gems/bundler-2.4.22/lib/bundler/setup -W0 RSPEC_SILENCE_FILTER_ANNOUNCEMENTS=1 /usr/local/bundle/gems/bundler-2.4.22/exe/bundle exec rspec --seed 52674 --format TurboTests::JsonRowsFormatter --out tmp/test-pipes/subprocess-28 --format ParallelTests::RSpec::RuntimeLogger --out spec/support/turbo_runtime_features.log spec/features/api_docs/index_spec.rb spec/features/custom_fields/reorder_options_spec.rb spec/features/projects/projects_portfolio_spec.rb spec/features/projects/template_spec.rb spec/features/versions/edit_spec.rb spec/features/work_packages/details/markdown/description_editor_spec.rb spec/features/work_packages/table/hierarchy/hierarchy_parent_below_spec.rb spec/features/work_packages/table/inline_create/inline_create_refresh_spec.rb spec/features/work_packages/table/invalid_query_spec.rb spec/features/work_packages/tabs/activity_revisions_spec.rb # rubocop:enable Layout/LineLength class TestsGroup attr_accessor :test_env_number, :seed, :files From 002b54119447a059264ae8c0eaa55464fb698025 Mon Sep 17 00:00:00 2001 From: Dombi Attila <83396+dombesz@users.noreply.github.com> Date: Thu, 14 Dec 2023 14:40:56 +0200 Subject: [PATCH 2/2] Install bundler in the CI docker script right before usage. --- docker/ci/entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/ci/entrypoint.sh b/docker/ci/entrypoint.sh index 31038a159ad1..0a74346c633e 100755 --- a/docker/ci/entrypoint.sh +++ b/docker/ci/entrypoint.sh @@ -107,7 +107,9 @@ setup_tests() { execute_quiet "cp docker/ci/database.yml config/" create_db_cluster - run_background execute "BUNDLE_JOBS=8 bundle install --quiet && bundle clean --force && echo BUNDLE DONE" + execute "gem install bundler --version '${BUNDLER_VERSION}' --no-document" + + run_background execute "BUNDLE_JOBS=8 bundle install --quiet && bundle clean --force && echo BUNDLE DONE" run_background execute "JOBS=8 time npm install --quiet && npm prune --quiet && echo NPM DONE" wait_for_background