Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

[RubyGems] Stop fetching all specs 😁#4930

Merged
homu merged 3 commits into2-0-devfrom
seg-fix-fetching-all-specs
Sep 1, 2016
Merged

[RubyGems] Stop fetching all specs 😁#4930
homu merged 3 commits into2-0-devfrom
seg-fix-fetching-all-specs

Conversation

@segiddins
Copy link
Copy Markdown
Contributor

@segiddins segiddins commented Aug 29, 2016

aka boolean logic is hard

segiddins and others added 2 commits August 29, 2016 13:47
Update specs to use compact_index 0.11

Also removed the penalty for adding requirements to dependencies!

\c @indirect

# Conflicts:
#	spec/support/artifice/compact_index_concurrent_download.rb
@segiddins
Copy link
Copy Markdown
Contributor Author

@homu r+

@homu
Copy link
Copy Markdown
Contributor

homu commented Aug 29, 2016

📌 Commit 20cbbf0 has been approved by segiddins

homu added a commit that referenced this pull request Aug 30, 2016
[RubyGems] Stop fetching all specs 😁

aka boolean logic is hard
@homu
Copy link
Copy Markdown
Contributor

homu commented Aug 30, 2016

⌛ Testing commit 20cbbf0 with merge b2ab190...

@homu
Copy link
Copy Markdown
Contributor

homu commented Aug 30, 2016

💔 Test failed - status

@segiddins
Copy link
Copy Markdown
Contributor Author

@indirect this now will avoid fetching the full index to get all dependency names

@indirect
Copy link
Copy Markdown

indirect commented Sep 1, 2016

@homu r+

@homu
Copy link
Copy Markdown
Contributor

homu commented Sep 1, 2016

📌 Commit bdb8534 has been approved by indirect

@homu homu merged commit bdb8534 into 2-0-dev Sep 1, 2016
homu added a commit that referenced this pull request Sep 1, 2016
[RubyGems] Stop fetching all specs 😁

aka boolean logic is hard
@homu
Copy link
Copy Markdown
Contributor

homu commented Sep 1, 2016

⚡ Test exempted - status

@segiddins segiddins deleted the seg-fix-fetching-all-specs branch September 22, 2016 10:52
@coilysiren coilysiren modified the milestone: Release Archive Sep 22, 2016
@coilysiren coilysiren modified the milestone: 2.0 — Breaking Changes Oct 9, 2016
bundlerbot added a commit that referenced this pull request Jun 27, 2017
[2.0] Remove RubyGems Aggregate & support transitive source pinning

### What was the end-user problem that led to this PR?

The problem was that the resolver could resolve specs from _any_ of the sources specified in the Gemfile, even if that source had nothing to do with the spec in question. This was such a large security vulnerability that, when discovered, it warranted a CVE and its own minor release of Bundler.

Closes #3671.
Closes #3696.
Closes #4059.

### Was was your diagnosis of the problem?

My diagnosis was that we needed to get rid of the notion of a `rubygems aggregate` and enforce that specs could only come either from the source they were declared to come from (the top-level source if declared at the top-level of the Gemfile, else a scoped source), or a source that it transitively "inherited" from the gems that required it.

### What is your fix for the problem, implemented in this PR?

My fix is to disable multiple top-level sources in the Gemfile, remove the RubyGems aggregate, and filter the sources gems could come from as described above.

### Why did you choose this fix out of the possible options?

I chose this fix because it allows doing the filtering in a reasonably performant manner, and refactors the way we handle sources to abstract some of the grossness in such a way that the machinations to make sure that all of the necessary gem info is downloaded is encapsulated into a single method, driven from the definition, rather than being specific to rubygems sources.

See #4714 and #4930 for the prior implementation.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants