Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add remote.Reuse for Pusher/Puller #1672

Merged
merged 5 commits into from
Apr 25, 2023
Merged

Commits on Apr 24, 2023

  1. Configuration menu
    Copy the full SHA
    5faaf0c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    85f203e View commit details
    Browse the repository at this point in the history
  3. crane: use puller/pusher in copy to drop legacy

    This package was only used to copy schema 1 images, which we don't need
    anymore.
    jonjohnsonjr committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    cf386da View commit details
    Browse the repository at this point in the history
  4. Add remote.Reuse for Pusher/Puller

    This is a big change, but it helps callers out a lot.
    
    The Pusher/Puller interfaces allow us to deduplicate a bunch of work
    (largely, ping an auth), but they only work if you actually use them.
    
    It's a huge pain to migrate callers from remote.{Image,Index,...}
    interfaces to start using Pusher/Puller because the remote functions can
    be called from anywhere, which means plumbing pushers and pullers around
    the entire callgraph, which is super painful.
    
    Happily, though, most callers already plumb remote.Options around the
    callgraph so that they can set their options in one place and have them
    be consistent throughout their application.
    
    This change takes advantage of that fact by introducing remote.Reuse,
    which takes either a Puller or a Pusher, and calls equivalent methods on
    said pusher/puller whenever you pass remote.Reuse into a remote
    function.
    
    The end result is that we can get almost all of the performance wins of
    using Puller/Pusher directly with a 3 line change to most applications
    rather than refactoring everything.
    jonjohnsonjr committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    860cfab View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2023

  1. Address review feedback

    jonjohnsonjr committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    a65ff5f View commit details
    Browse the repository at this point in the history