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

Re: [PATCH v2 1/2] ci: skip GitHub workflow runs for already-tested commits/trees

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2020, 16:12 UTC
Message-ID
<xmqqy2kbqv7b.fsf@gitster.c.googlers.com>
In-Reply-To
<nycvar.QRO.7.76.6.2010111221350.50@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Also, the patch specifically adjusts the GitHub workflow itself.
> Therefore, unlike the `skip_good_tree()` function, it does not pretend to
> be generic (which `skip_good_tree()` really is not, as pointed out above).

I think skip_good_tree aspired to be a generic one, by having the "if we are not in travis nor GitHub actions, return early" at its very beginning. The person who adds support to GitHub workflow could have done one of two things.

One is to recognise the aspiration, and restructure existing skip_good_tree from

    skip_good_tree () {
	return if not travis and if not github actions
	bunch of code that happens to work only on travis
    }
to
    skip_good_tree () {
	if travis
	then
	    bunch of code that happens to work only on travis
	else if github actions
	    bunch of code that happens to work only with github
	fi
    }

without touching the caller. That lets skip_good_tree to be generic.

Another is to completely ignore that aspiration, maybe doing all that inside the workflow script (which by definition works only with github).

I think the latter (i.e. what the patch choose to do, which is not to bother with the ci/*.sh scripts at all) would be cleaner in this particular case, but then it would have made the intention more clear if the conditional at the beginning of skip_good_tree() were adjusted, perhaps?

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 11 of 16 in “ci: fix GitHub workflow when on a tagged revision”
  1. ci: fix GitHub workflow when on a tagged revisionJohannes Schindelin via GitGitGadget, Apr 24, 2020
  2. Junio C HamanoApr 24, 2020
  3. Johannes SchindelinApr 24, 2020
  4. Junio C HamanoApr 24, 2020
  5. 0/2 Do not skip tagged revisions in the GitHub workflow runsJohannes Schindelin via GitGitGadget, Oct 8, 2020
  6. 1/2 ci: skip GitHub workflow runs for already-tested commits/treesJohannes Schindelin via GitGitGadget, Oct 8, 2020
  7. SZEDER GáborOct 9, 2020
  8. Johannes SchindelinOct 9, 2020
  9. SZEDER GáborOct 10, 2020
  10. Johannes SchindelinOct 11, 2020
  11. Junio C HamanoOct 12, 2020
  12. Johannes SchindelinOct 12, 2020
  13. Junio C HamanoOct 15, 2020
  14. Johannes SchindelinOct 15, 2020
  15. 2/2 ci: do not skip tagged revisions in GitHub workflowsJohannes Schindelin via GitGitGadget, Oct 8, 2020
  16. Junio C HamanoOct 8, 2020

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.