Project

General

Profile

Actions

Bug #18643

open

test-bundler failed on ruby_3_1 CI

Added by znz (Kazuhiro NISHIYAMA) 2 months ago. Updated 2 months ago.

Status:
Assigned
Priority:
Normal
Target version:
-
[ruby-core:107966]

Description

I think that this spec has failed since newer bundler released.

https://github.com/ruby/actions/runs/5590419280?check_suite_focus=true#step:18:199


       expected "Running `bundle update --bundler \"> 0.a\"` with bundler 2.3.7\nHTTP GET https://index.rubygems.org/...ctions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/rack-1.2.gemspec\nBundle updated!" to include "Using bundler 2.3.7\n"
       Diff:
       @@ -1,19 +1,37 @@
       -Using bundler 2.3.7\n
       +Running `bundle update --bundler "> 0.a"` with bundler 2.3.7
       +HTTP GET https://index.rubygems.org/versions
       +HTTP 200 OK https://index.rubygems.org/versions
       +Fetching gem metadata from https://rubygems.org/
       +Looking up gems ["bundler"]
       +HTTP GET https://index.rubygems.org/info/bundler
       +HTTP 200 OK https://index.rubygems.org/info/bundler
       +Updating bundler to 2.3.9.
       +Fetching bundler 2.3.9
       +Installing bundler 2.3.9
       +Running `bundle update --bundler "> 0.a"` with bundler 2.3.9
       +Found no changes, using resolution from the lockfile
       +Using bundler 2.3.9
       +0:  bundler (2.3.9) from /home/runner/work/actions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/bundler-2.3.9.gemspec
       +Using prints_loaded_gems 1.0
       +0:  prints_loaded_gems (1.0) from /home/runner/work/actions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/prints_loaded_gems-1.0.gemspec
       +Using rack 1.2
       +0:  rack (1.2) from /home/runner/work/actions/actions/snapshot-ruby_3_1/tmp/4/gems/system/specifications/rack-1.2.gemspec
       +Bundle updated!
     # ./spec/bundler/commands/binstubs_spec.rb:229:in `block (5 levels) in <top (required)>'
     # ./spec/bundler/spec_helper.rb:101:in `block (4 levels) in <top (required)>'
     # ./spec/bundler/spec_helper.rb:101:in `block (3 levels) in <top (required)>'
     # ./spec/bundler/support/helpers.rb:350:in `block in with_gem_path_as'
     # ./spec/bundler/support/helpers.rb:364:in `without_env_side_effects'
     # ./spec/bundler/support/helpers.rb:345:in `with_gem_path_as'
     # ./spec/bundler/spec_helper.rb:100:in `block (2 levels) in <top (required)>'

It can reproduce with a small example.

Spec expects 3.0's behavior:

$ rbenv local 3.0.3
$ bundle init
Writing new Gemfile to /tmp/x/Gemfile
$ bundle i
The Gemfile specifies no dependencies
Resolving dependencies...
Bundle complete! 0 Gemfile dependencies, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ bundle update --bundler "> 0.a"
The Gemfile specifies no dependencies
Bundle updated!
$

Actual 3.1's behavior:

$ rbenv local 3.1.1
$ bundle init
Writing new Gemfile to /tmp/x/Gemfile
$ bundle i
The Gemfile specifies no dependencies
Resolving dependencies...
Bundle complete! 0 Gemfile dependencies, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ bundle update --bundler "> 0.a"
Fetching gem metadata from https://rubygems.org/.
The Gemfile specifies no dependencies
Bundle updated!
$

I'm not sure which is expected behavior: spec's or changed implementation.

Updated by hsbt (Hiroshi SHIBATA) 2 months ago

  • Assignee set to hsbt (Hiroshi SHIBATA)
  • Status changed from Open to Assigned

Updated by vo.x (Vit Ondruch) 2 months ago

hsbt (Hiroshi SHIBATA) wrote in #note-1:

https://github.com/ruby/ruby/pull/5608 will fix this issue.

Unfortunately, this will be fix just up until new Bundler is released again. Since we have bumped into this recently in Fedora 1, I'd appreciate if the test was more resilient to Bundler updates.

Updated by jaruga (Jun Aruga) 2 months ago

I am working on this PR to fix this test considering the case that the latest Bundler version on RubyGems is newer than the Bundler bundled in Ruby.
https://github.com/rubygems/rubygems/pull/5410

Actions

Also available in: Atom PDF