git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-retry tool or git.retry config (built-in implementation)?
@ 2023-09-26 16:47 Yaroslav Halchenko
  2023-09-26 23:57 ` Bagas Sanjaya
  0 siblings, 1 reply; 5+ messages in thread
From: Yaroslav Halchenko @ 2023-09-26 16:47 UTC (permalink / raw)
  To: git@vger.kernel.org; +Cc: Isaac To

Dear Git Gurus,

In DataLad (https://datalad.org) we are doing lots of automated cloning,
fetching etc as part of our CI etc jobs.  Once in a while git operations
fail [see e.g. 1], and beg us to retry but we need to know when to
do so, and not do it upon every failed git invocation since some
failures could be legit (repository is gone). While looking how others
solve it we found
https://stackoverflow.com/questions/35014012/git-retry-if-http-request-failed
which pointed to tools like git-retry and later part of
https://chromium.googlesource.com/infra/infra/+/HEAD/go/src/infra/tools/git/retry_regexp.go
which serve as a collection of regexes to be on lookout for to retry.

Would that be the "best" strategy currently?  

As regex matching might eventually break whenever `git` changes
anything in the output messages, I wondered if there could be a more
robust internal implementation in git itself?  Similarly git-annex has
annex.retry config setting which sets the count of retries for
"retriable" operations.  

Do you think something like that could be implemented in git in some
foreseable future?

[1] https://github.com/datalad/datalad/issues/7485

Thank you in advance!
-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
WWW:   http://www.linkedin.com/in/yarik        


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: git-retry tool or git.retry config (built-in implementation)?
@ 2024-02-16  8:36 Meiswinkel, Jan  SF/HZA-ZC3S
  0 siblings, 0 replies; 5+ messages in thread
From: Meiswinkel, Jan  SF/HZA-ZC3S @ 2024-02-16  8:36 UTC (permalink / raw)
  To: bagasdotme@gmail.com
  Cc: git@vger.kernel.org, gitster@pobox.com, isaac.chun.to@gmail.com,
	yoh@onerussian.com

(let's try this again - had html enabled)

Hi,

I think this thread might have died - a retry-logic for git commands would be great. IMO it is not even needed to continue the transfer from the faulty point, it would be a great benefit already if it dumps the failed request and simply retries the request X times with a backoff factor (just as the user would do manually if his request failed).

Any hopes?

Best
Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-16  8:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-26 16:47 git-retry tool or git.retry config (built-in implementation)? Yaroslav Halchenko
2023-09-26 23:57 ` Bagas Sanjaya
2023-09-27 12:42   ` Yaroslav Halchenko
2023-09-27 13:29     ` Bagas Sanjaya
  -- strict thread matches above, loose matches on Subject: below --
2024-02-16  8:36 Meiswinkel, Jan  SF/HZA-ZC3S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).