Closed mkusaka closed 2 years ago
Hi @mkusaka Thank you for raising this!
I will look into working a solution into the orb asap.
As stated in the associated PR, we'll be implementing the rvm package fix. bundle will also be configured with the rvm openssl directory. This should prevent any issues with packages that require ssl to install.
I'll be implementing the option to cache the rvm folder next so that the install is a onetime problem. This will also be beneficial for caching ruby versions as well.
Orb version:
2.0.0 (also 1.8.0)
What happened:
After updating cimg/node from 16.17.1 to 16.18.0, the gem installation failed in the environment set up with ruby/install. ruby version was 2.7.6.
Here is the configuration file that reproduces
ref. https://github.com/mkusaka/ruby-orb-issue-repro/blob/3a1188dac37599e24814c020058e3b71415c79c8/.circleci/config.yml
The error message was something like this
ref. https://app.circleci.com/pipelines/github/mkusaka/ruby-orb-issue-repro/2/workflows/bbc2c09a-36d2-4bb0-b926-9cb3b3123c58/jobs/2
As the error message shows, this seems to be caused by openssl.
Expected behavior:
I want gem install to not fail after install ruby2.7.6 with ruby/install even in an environment with cimb/base:2022.09 as the base image.
Additional Information:
After some investigation, I found that cimg/node 16.17.1 uses openssl 1.1.1f (ubuntu 20.04) and cimg/node 16.18.0 uses openssl 3.0.2 (ubuntu 22.04).
This is caused by cimg/base changing the base image from ubuntu 20.04 to 22.04 at the time of 2022.08 to 2022.09, and cimg/node changing the base image from cimg/base 2022.08 to 2022.10 at the time of 16.17.1.
The problem related to openssl 3.0.0 (ubuntu22.04) seems to be a known issue in ruby and in case of ruby-build, a solution has been found . However, the current installation of the ruby-orb script (based on rvm) does not work, and it seems that we need to re-install via script.
At this moment, there are several workarounds.
A. Re-install via rvm
Change the configuration file as follows
ref. https://github.com/mkusaka/ruby-orb-issue-repro/blob/6f15e0fb1ec57903e211d187659f83256f1fd5fb/.circleci/config.yml
The problem with this workarond is reinstallation via rvm is very slow (about 4minutes).
B. Stop using cimg/node and change cimg/base with ubuntu 20.04
Change the configuration file as follows
ref. https://github.com/mkusaka/ruby-orb-issue-repro/blob/1bdb39845afe3fe799e067e3e55578b2ba3cbd3f/.circleci/config.yml
The problem with this workarond is that it requires more effort to create an environment equivalent to a convenience image such as cimg/node:16.18.0-browsers.