Skip to content

Conversation

@prajjwaldimri
Copy link

No description provided.

eregon and others added 30 commits November 21, 2024 14:11
If set up `rubygems: latest` in workflow,
it will cause the error with Ruby 3.0 because the latest rubygems does not support Ruby 3.0.

Ref. https://rubygems.org/gems/rubygems-update

### Error message
```
Updating RubyGems
  /opt/hostedtoolcache/Ruby/3.0.7/x64/bin/gem --version
  3.2.33
  Default RubyGems version is 3.2.33
  Updating RubyGems to latest version
  /opt/hostedtoolcache/Ruby/3.0.7/x64/bin/gem update --system
  ERROR:  Error installing rubygems-update:
  	rubygems-update-3.6.1 requires Ruby version >= 3.1.0. The current ruby version is 3.0.7.220.
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `version' for nil:NilClass
  Updating rubygems-update
  Took   2.86 seconds
Error: The process '/opt/hostedtoolcache/Ruby/3.0.7/x64/bin/gem' failed with exit code 1
```

### How to reproduce
```
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.0"
          rubygems: latest
```
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
**What does this PR do?**

This PR provides the final piece of the puzzle to fix ruby#682: now that
ruby-dev-builder is building `3.4-asan` Rubies since
ruby/ruby-dev-builder#15, we can make them
available for use.

**Motivation:**

At Datadog, we're using ASan builds to check for issues
[in our library](https://github.com/datadog/dd-trace-rb),
and having a `3.4-asan` build improves the experience of having
these checks be a required CI step. Using the ASan builds built from
ruby-head means our CI could break because of unrelated issues/changes
from ruby-head.

**Additional Notes:**

`yarn` was trying really hard to update a bunch of things, which
generated A LOT of diff noise. I've manually pared them down just
to the actual changes related to adding the new variant so the
diff makes a bit more sense.

**How to test the change?**

I've already tested this in
https://github.com/DataDog/dd-trace-rb/actions/runs/13392865620/job/37696781848
and it seems to be working fine!
jtannas and others added 13 commits March 5, 2025 20:06
* JRuby 10 requires Java 21. Since the previous default was 17 and all JRuby releases should work fine on 21, we do this for all JRuby installs.
* Implements ruby#718
Apparently this exec errors when the subprocess fails rather than
returning an error code. This causes the whole setup process to
terminate. This patch catches the error and uses that to indicate
failure to launch.
Native launcher appears to hang on GHA when the JDK version is too
old for JRuby 10. This bypasses it and should be a bit lighter. It
will also avoid any variability in the launcher used, since Unixes
and Windows already use different executables.
@prajjwaldimri prajjwaldimri self-assigned this Mar 21, 2025
@prajjwaldimri prajjwaldimri merged commit 57db04f into master Mar 21, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.