git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] ci: skip unavailable external software

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 25, 2025, 14:39 UTC
Message-ID
<xmqqv7qsuwye.fsf@gitster.g>
In-Reply-To
<aAtdsURaaxYO7pVt@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 12 quoted lines
> But shouldn't the failing wget cause an error, too? So the `|| { }`
> cleanup branch would execute in that case and we can prune the empty
> file there. So in other words, shouldn't the following work alright?
>
>     if wget --output-document=...
>     then
>         massage output
>     else
>         rm output
>     fi
>
> Or am I still missing the obvious?

While the above "works", what is "obvious" is that it is way too verbose and the merit of going verbose is dubious, especially given that the reason that trigger the argument to favor the above construct over the more concise

	wget && massage || rm
is "massage part should never fail".

We do want to notice a failure in something, if that something is what should never fail, don't we? Not necessarily so!

Our CI jobs are not in the business of checking and ensuring wget or chmod keeps working. If either of them fail, the more important part is its practical impact to the rest of the CI job---resulting "jgit" file is harmful to be left on disk and needs to be removed.

Another to think about this is to imagine if we are having this conversation, had "wget" had (just like its --output-document argument) a "--chmod" argument. (wget && massage) as a unit is conceptually a single "download the jgit binary" in this case, and if either of them fail, we failed to download it.

So, yes, either would "work", but I do not think longhand is warranted in this case.

Previous: Patrick SteinhardtNext: Johannes Schindelin
Message 6 of 16 in “repo.eclipse.org outage breaking all our linux CI jobs”
  1. Junio C HamanoApr 24, 2025
  2. ci: skip unavailable external softwareJunio C Hamano, Apr 24, 2025
  3. Patrick SteinhardtApr 25, 2025
  4. Junio C HamanoApr 25, 2025
  5. Patrick SteinhardtApr 25, 2025
  6. Junio C HamanoApr 25, 2025
  7. Johannes SchindelinApr 25, 2025
  8. Junio C HamanoApr 25, 2025
  9. 0/2 ci: update unavailable external software handlingJunio C Hamano, Apr 25, 2025
  10. 1/2 ci: update the message for unavailble third-party softwareJunio C Hamano, Apr 25, 2025
  11. 2/2 ci: download JGit from maven, not eclipse.orgJunio C Hamano, Apr 25, 2025
  12. shejialuoApr 25, 2025
  13. Junio C HamanoApr 25, 2025
  14. shejialuoApr 26, 2025
  15. Patrick SteinhardtApr 28, 2025
  16. shejialuoApr 28, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.