<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/bundler/compact_index_client/updater.rb, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[rubygems/rubygems] Retry gracefully on blank partial response in compact index</title>
<updated>2025-02-28T03:34:57+00:00</updated>
<author>
<name>Martin Emde</name>
<email>me@martinemde.com</email>
</author>
<published>2025-02-22T01:57:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=19bdcc8f0c1f08b60aa41044ba5b78b55a5c650e'/>
<id>19bdcc8f0c1f08b60aa41044ba5b78b55a5c650e</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/fafb9ae090
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/fafb9ae090
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Remove MD5 ETag generation from compact index</title>
<updated>2024-05-23T22:57:26+00:00</updated>
<author>
<name>Martin Emde</name>
<email>me@martinemde.com</email>
</author>
<published>2024-05-21T23:19:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=76e31d9aa93ce624a8f74db57af488c74017b7f3'/>
<id>76e31d9aa93ce624a8f74db57af488c74017b7f3</id>
<content type='text'>
This was an offramp for generated etags to allow existing caches
to be served until people could upgrade. It has been about 6 months
since the transitional version was released, so we can remove this
transitional code now.

https://github.com/rubygems/rubygems/commit/4ec8cfe611
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was an offramp for generated etags to allow existing caches
to be served until people could upgrade. It has been about 6 months
since the transitional version was released, so we can remove this
transitional code now.

https://github.com/rubygems/rubygems/commit/4ec8cfe611
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Quote Etag in `If-None-Match` header of compact index request</title>
<updated>2024-01-05T02:06:58+00:00</updated>
<author>
<name>Martin Emde</name>
<email>martin.emde@gmail.com</email>
</author>
<published>2024-01-04T00:00:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=098d97e96d1519154c2a845db558b104abe3ab7e'/>
<id>098d97e96d1519154c2a845db558b104abe3ab7e</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/d26bcd7551
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/d26bcd7551
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Use vendored net-http in Bundler</title>
<updated>2023-12-13T03:16:55+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2023-01-29T20:28:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=90317472e87692fff1c864d129d60130dc3bab2c'/>
<id>90317472e87692fff1c864d129d60130dc3bab2c</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/0d758e8926
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/0d758e8926
</pre>
</div>
</content>
</entry>
<entry>
<title>Opaque Etags for compact index requests</title>
<updated>2023-11-27T06:04:40+00:00</updated>
<author>
<name>Josef Šimánek</name>
<email>josef.simanek@gmail.com</email>
</author>
<published>2023-06-27T00:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=71a8daecd9ad10ba8aa0d66131e326722f1d78ad'/>
<id>71a8daecd9ad10ba8aa0d66131e326722f1d78ad</id>
<content type='text'>
This changes the CompactIndexClient to store etags received from the
compact index in separate files rather than relying on the MD5 checksum
of the file as the etag.

Smoothes the upgrade from md5 etags to opaque by generating them when no
etag file exists. This should reduce the initial impact of changing the
caching behavior by reducing cache misses when the MD5 etag is the same.

Eventually, the MD5 behavior should be retired and the etag should be
considered completely opaque with no assumption that MD5 would match.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This changes the CompactIndexClient to store etags received from the
compact index in separate files rather than relying on the MD5 checksum
of the file as the etag.

Smoothes the upgrade from md5 etags to opaque by generating them when no
etag file exists. This should reduce the initial impact of changing the
caching behavior by reducing cache misses when the MD5 etag is the same.

Eventually, the MD5 behavior should be retired and the etag should be
considered completely opaque with no assumption that MD5 would match.
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Reduce allocations when parsing compact index</title>
<updated>2023-10-08T04:17:15+00:00</updated>
<author>
<name>Samuel Giddins</name>
<email>segiddins@segiddins.me</email>
</author>
<published>2023-09-18T20:56:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2b6228be48dc656c3e7a95919622e4b8561324cf'/>
<id>2b6228be48dc656c3e7a95919622e4b8561324cf</id>
<content type='text'>
This still allocates a ton (a string for each line, plus a bunch of
splits into arrays), but it helps a bit when Bundler has to go through
dependency resolution.

```
==&gt; memprof.after.txt &lt;==
Total allocated: 194.14 MB (2317172 objects)
Total retained:  60.81 MB (593164 objects)

==&gt; memprof.before.txt &lt;==
Total allocated: 211.97 MB (2404890 objects)
Total retained:  62.85 MB (640342 objects)
```

https://github.com/rubygems/rubygems/commit/c68b41b0e5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This still allocates a ton (a string for each line, plus a bunch of
splits into arrays), but it helps a bit when Bundler has to go through
dependency resolution.

```
==&gt; memprof.after.txt &lt;==
Total allocated: 194.14 MB (2317172 objects)
Total retained:  60.81 MB (593164 objects)

==&gt; memprof.before.txt &lt;==
Total allocated: 211.97 MB (2404890 objects)
Total retained:  62.85 MB (640342 objects)
```

https://github.com/rubygems/rubygems/commit/c68b41b0e5
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge RubyGems/Bundler master</title>
<updated>2022-12-12T01:49:43+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-12-12T00:09:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bbe56a643734025aef6a3cbeb07c5306505040f6'/>
<id>bbe56a643734025aef6a3cbeb07c5306505040f6</id>
<content type='text'>
  from https://github.com/rubygems/rubygems/commit/bfb0ae69776069155d2092702bfbb5a12617d85a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  from https://github.com/rubygems/rubygems/commit/bfb0ae69776069155d2092702bfbb5a12617d85a
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Fix misleading error if compact index cannot be copied</title>
<updated>2022-07-14T06:06:09+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2022-07-12T10:33:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=76de7a92b90e216c6645e93a3a034bc2f4257b03'/>
<id>76de7a92b90e216c6645e93a3a034bc2f4257b03</id>
<content type='text'>
Previously if `~/.bundle/cache/compact_index/rubygems.org.*/version`
were owned by root with read-only access, `bundle install` would fail
with a misleading error message. For example:

```
There was an error while trying to write to `/tmp/bundler-compact-index-20220711-1823-npllre/versions`. It is
likely that you need to grant write permissions for that path.
```

This happened because the EACCESS error was caught by
`SharedHelpers.filesystem_access`, which makes it look like the target
directory is at fault instead of the source.

We can't simply drop this guard because that causes the opposite
problem: the permission error appears to come from the source instead of
the target, since `CompactIndexClient::Cache#lines` also wraps read
access errors.

Instead, bring a minimal implementation of `FileUtils.cp` and nest calls
to `SharedHelpers.filesystem_access` properly.

https://github.com/rubygems/rubygems/commit/320822c070

Co-authored-by: Stan Hu &lt;stanhu@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously if `~/.bundle/cache/compact_index/rubygems.org.*/version`
were owned by root with read-only access, `bundle install` would fail
with a misleading error message. For example:

```
There was an error while trying to write to `/tmp/bundler-compact-index-20220711-1823-npllre/versions`. It is
likely that you need to grant write permissions for that path.
```

This happened because the EACCESS error was caught by
`SharedHelpers.filesystem_access`, which makes it look like the target
directory is at fault instead of the source.

We can't simply drop this guard because that causes the opposite
problem: the permission error appears to come from the source instead of
the target, since `CompactIndexClient::Cache#lines` also wraps read
access errors.

Instead, bring a minimal implementation of `FileUtils.cp` and nest calls
to `SharedHelpers.filesystem_access` properly.

https://github.com/rubygems/rubygems/commit/320822c070

Co-authored-by: Stan Hu &lt;stanhu@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Let original EACCES error be raised</title>
<updated>2021-12-03T20:18:11+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2021-11-29T12:43:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c38c1d82b14237cd9d4268b88fef28e9379280f9'/>
<id>c38c1d82b14237cd9d4268b88fef28e9379280f9</id>
<content type='text'>
This block of code already wraps file operations with
`SharedHelpers.filesystem_access`, which rescues and re-raises more
friendly errors. Also, I'm not fully sure creating a temporary directory
can end up raising an `Errno::EACCES` error from reading `tmpdir`
sources. Finally, this rescue block apparently leads to some false
positives when firewall is blocking the ruby executable on Windows, or
at least that's what we've got reported.

In any case, I think it's best to let the original error be raised.

https://github.com/rubygems/rubygems/commit/f7dbe54404
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This block of code already wraps file operations with
`SharedHelpers.filesystem_access`, which rescues and re-raises more
friendly errors. Also, I'm not fully sure creating a temporary directory
can end up raising an `Errno::EACCES` error from reading `tmpdir`
sources. Finally, this rescue block apparently leads to some false
positives when firewall is blocking the ruby executable on Windows, or
at least that's what we've got reported.

In any case, I think it's best to let the original error be raised.

https://github.com/rubygems/rubygems/commit/f7dbe54404
</pre>
</div>
</content>
</entry>
<entry>
<title>Sync bundler &amp; rubygems</title>
<updated>2021-05-11T02:29:41+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2021-04-21T11:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5b0abba9317f206913cf2e599d0dac7e9dbd0baa'/>
<id>5b0abba9317f206913cf2e599d0dac7e9dbd0baa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
