All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: Glen Choo <chooglen@google.com>
Cc: Jonathan Tan <jonathantanmy@google.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] promisor-remote: die upon failing fetch
Date: Fri, 30 Sep 2022 15:10:16 -0700	[thread overview]
Message-ID: <20220930221016.2081461-1-jonathantanmy@google.com> (raw)
In-Reply-To: <kl6l8rm3mm2x.fsf@chooglen-macbookpro.roam.corp.google.com>

Glen Choo <chooglen@google.com> writes:
> I'm not certain that this fail-fast approach is always a better user
> experience:
> 
> - I could imagine that for a small-enough set of objects (say, a very
>   restrictive set of sparse specifications), one-by-one fetching would be
>   good enough.

I think that in this case, if you couldn't fetch a small set, you
wouldn't be able to fetch a single object too.

> - Even if one-by-one fetching isn't fast, I'd imagine that each
>   individual fetch is more likely to succeed than a batch prefetch, and
>   as a user, I would prefer to ^C an operation that takes longer than I
>   expected than to have retry the repeatedly.

Hmm...but when you ^C, you have to retry it too right?

> Here are some other arguments that you didn't mention, but I find more
> convincing:
> 
> - Running prefetch in a non-interactive process (e.g. running a job in
>   CI) and the user would prefer to fail fast than to have the job run
>   longer than expected, e.g. they could script retries manually
>   (although, maybe we should do that ourselves).

That's true.

> - Fetching might be subject to a quota, which will be exhausted by
>   one-by-one fetching.

I'll add a note that lengthy execution can be bad for quota reasons as
well (in addition to others).

> As such, it _might_ make sense to make this behavior configurable, since
> we may sometimes want it and sometimes not.

I don't think there is a compelling reason to fallback to single object
fetching (which is there not because it is useful, but just so that Git
commands that haven't been updated to prefetch will still function), so
I'd rather not add an option for this.

  reply	other threads:[~2022-09-30 22:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 22:12 [PATCH 0/2] Fail early when partial clone prefetch fails Jonathan Tan
2022-09-27 22:12 ` [PATCH 1/2] promisor-remote: remove a return value Jonathan Tan
2022-09-29 19:23   ` Junio C Hamano
2022-09-30 22:02     ` Jonathan Tan
2022-09-27 22:12 ` [PATCH 2/2] promisor-remote: die upon failing fetch Jonathan Tan
2022-09-28 17:43   ` Glen Choo
2022-09-30 22:10     ` Jonathan Tan [this message]
2022-09-29 20:14   ` Junio C Hamano
2022-09-29 20:15 ` [PATCH 0/2] Fail early when partial clone prefetch fails Junio C Hamano
2022-09-30 21:50   ` Jonathan Tan
2022-09-30 22:17     ` Junio C Hamano
2022-10-04 21:13 ` [PATCH v2 " Jonathan Tan
2022-10-04 21:13   ` [PATCH v2 1/2] promisor-remote: remove a return value Jonathan Tan
2022-10-04 21:13   ` [PATCH v2 2/2] promisor-remote: die upon failing fetch Jonathan Tan
2022-10-05 18:09   ` [PATCH v2 0/2] Fail early when partial clone prefetch fails Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220930221016.2081461-1-jonathantanmy@google.com \
    --to=jonathantanmy@google.com \
    --cc=chooglen@google.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.