| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
Adds a filter_uri method to HTTPError backed by the
URICredentialsFilter to be used when preparing error output.
In the tests, replace a double object with a real URI and
change a test hostname to be valid so that older versions of
Ruby's URI module don't choke on it. It would be cool to somehow
replace this work with the `anonymized_uri` in the
Bundler::Source::Rubygems::Remote class.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
by raising FallbackError on 404 as well as 413, and then adding FallbackError to the list of errors to not retry, we both cancel retries for 404s and incidentally also cancel retries on 413s.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- Part of design direction to move more functionality out of the
`Bundler` top-level module.
|
| |
|
| |
|
|
|
|
|
| |
- These are all Exception classes that indicate scenarios where retrying
the fetch/request would not suddenly have a successful result.
|
|\
| |
| |
| | |
More rubocop_todo cleanup
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Retry `Fetcher#specs` with `Bundler::Retry`
As mentioned in https://github.com/heroku/heroku-buildpack-ruby/pull/435, bundler failed at the step of fetching version metadata:
```
Fetching version metadata from https://rubygems.org/Net::HTTPInternalServerError: <?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Error><Code>InternalError</Code><Message>We encountered an internal error.
Please try
again.</Message><RequestId>E7402EA19C5D6803</RequestId><HostId>hzuvaA1JAZX6ST+OL4ARYeAqZ/tgkM2yOjZgBq6Panu10YzWtfNNozOg8N5qR3gxFE/sUfYGP48=</HostId></Error>
```
It turns out the retry logic doesn’t cover fetching source index, gem metadata, version metadata and dependency metadata. A new method `Fetcher#specs_with_retry` is added to wrap `Fetcher#specs` with `Bundler::Retry` which reties when bundler fails in the mentioned cases.
/cc @schneems
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As mentioned in https://github.com/heroku/heroku-buildpack-ruby/pull/435, bundler failed at the step of fetching version metadata:
```
Fetching version metadata from https://rubygems.org/Net::HTTPInternalServerError: <?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Error><Code>InternalError</Code><Message>We encountered an internal error.
Please try
again.</Message><RequestId>E7402EA19C5D6803</RequestId><HostId>hzuvaA1JAZX6ST+OL4ARYeAqZ/tgkM2yOjZgBq6Panu10YzWtfNNozOg8N5qR3gxFE/sUfYGP48=</HostId></Error>
```
It turns out the retry logic doesn’t cover fetching source index, gem metadata, version metadata and dependency metadata. A new method `Fetcher#specs_with_retry` is added to wrap `Fetcher#specs` with `Bundler::Retry` which reties when bundler fails in the mentioned cases.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Send X-Gemfile-Source when bundling with --full-index
This fixes #4090
I did a little refactoring that made sense to me along the way, but if I went too far or might be breaking something I'm not aware of, please let me know.
**Existing issue:** This doesn't fix bundling with full index when using Rubygems < 2.0, as that code path seemed a bit trickier to fix. I added a *TODO* comment at the relevant method. I thought of a couple possibilities:
* Subclass `Gem::SpecFetcher` like `Bundler::GemRemoteFetcher`, it seems like it might be as simple as calling the super constructor and then replace `@fetcher` with a `Bundler::GemRemoteFetcher` with the headers added ahead of time (see https://github.com/rubygems/rubygems/blob/v1.8.30/lib/rubygems/spec_fetcher.rb#L66). This may involve different solutions the further back in Rubygems you go.
* Use the newer implementation of `fetch_all_remote_specs` for older Rubygems as well (I don't know if that would work though, but it might be worth a try).
I haven't yet added additional specs for this, but I wanted to get this out there first to get some feedback if possible.
|
| |
| |
| |
| |
| |
| |
| | |
Move fetch_uri into the base fetcher
Expose remote for base fetcher
Set and restore gem sources only seems to be neccessary in one form of fetch_all_remote_specs
Send X-Gemfile-Source header when fetching the specs
|
| |
| |
| |
| |
| | |
I really don't like this solution, but it's the simplest one so we can
recover from that error on 1.8.7.
|
|/
|
|
| |
This fixes #4074
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|