Skip to content

Can't fetch GitHub gem with pull request URL starting with 2.4.0 #6239

@etiennebarrie

Description

@etiennebarrie

Describe the problem as clearly as you can

Starting with 2.4.0, gems that use the provided :github source with a pull request URL (#5126) are not able to be fetched anymore.

Did you try upgrading rubygems & bundler?

Yes, I ran gem update --system and bundle update --bundler and that failed on my repo, then I bisected by running bundle _2.3.24_ update --bundler (the version used in that repo) and bundle _2.4.0_ update --bundler started failing.

Post steps to reproduce the problem

You can use this repro script:

# bug.rb
gem "bundler", ARGV.first != "bug" ? "2.3.26" : "2.4.0"
require "bundler/inline"

gemfile do
  source "https://rubygems.org"

  gem "reline", github: "https://github.com/ruby/reline/pull/488"
end

Running gem install bundler:2.3.26 bundler:2.4.0 then ruby bug.rb works (using 2.3.26), but not ruby bug.rb bug (using 2.4.0).

Which command did you run?

Originally it was a simple bundle install, running in a clean environment where the repo wasn't already fetched. If the Git repo is already fetched and cached, installing with 2.4.0 works fine.

What were you expecting to happen?

Even if the PR is closed, we should be able to fetch its ref.

What actually happened?

The remote ref couldn't be fetched.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions