CircleCI-Public / CircleCI-Public/ruby-orb

Warning messages are printed (to both stderr and stdout) when "base" ruby image meets version requirement.

Open
#173 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Shell
Stars
25
Forks
55
PR merge metrics
No merged PRs in 30d

Description

## Orb version: 2.6.0

## What happened:

We are pinning ruby version with .ruby-version. We are using the orb's commands for installing ruby, selecting a ruby version, and installing gem dependencies.

In many of the steps of this orb (and indeed, other subsequent orb commands), we receive error messages that state:

```
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
```

These seem to be diagnostic messages only, as the specified version of ruby _is_ installed, and seems to work.

More problematic: messages are being printed to _both_ stderr and stdout. They are not duplicate messages. Rather, one of the lines is going to stderr; and the other line to stdout. This is especially problematic because it breaks downstream tooling that needs to exec a command and capture/parse its output. (For example: Selenium: https://github.com/SeleniumHQ/selenium/issues/17521 )

## Expected behavior:

I would expect error messages to be actionable and accurate. These messages seem to be inaccurate, and misleading. And they should be constrained to STDERR, not cluttering STDOUT.

## Additional Information:

snippets of our config:

```yml
orbs:
browser-tools: circleci/browser-tools@1.5.1 # https://circleci.com/developer/orbs/orb/circleci/browser-tools
node: circleci/node@7.2.1 # https://circleci.com/developer/orbs/orb/circleci/node
ruby: circleci/ruby@2.6.0 # https://circleci.com/developer/orbs/orb/circleci/ruby

# /snip

steps:
- checkout

# Dependencies

- browser-tools/install-browser-tools
- ruby/install: { version: "$(cat .ruby-version)" }
- ruby/install-deps
- node/install: { install-yarn: true } # respects .node-version and .nvmrc
- node/install-packages: { pkg-manager: yarn }
```

(I'm trying to copy the command names from circle but the webpage prevents users from copying the command name 😞 )

Installing ruby via RVM
```
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
Ruby 3.3.10 is already installed, exitting.
```

(sidenote: "exitting" is a typo)

Determine lock file

```
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
Using Gemfile.lock as lock file
```

Install bundler
```
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
Lock file detected bundler version 2.7.2
bundler 2.7.2 is already installed.
```

Bundle Install
```
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
/home/circleci/sundays/LICENSE
The Gemfile's dependencies are satisfied
```

Install Yarn
```
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
Unknown ruby interpreter version (do not know how to handle): .rubygems.
Latest version of Yarn is 1.22.22
Checking if YARN is already installed...
A different version of Yarn is installed (1.22.19); removing it
^@^@Installing YARN v1.22.22
Verifying YARN install
Success! Yarn 1.22.22 has been installed to /usr/local/bin/yarn
```

Checking for package.json

```
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
```

Determine lockfile (why is this lockfile but the ruby orb is "lock file" ? )
```
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
Found yarn.lock file, assuming lockfile
```

Installing YARN packages
```
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.44s.
```

Remove temporary links
```
Required ruby-3.3.10 is not installed.
To install do: 'rvm install "ruby-3.3.10"'
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.