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

Re: [PATCH] ci: avoid unnecessary builds

From
Derrick Stolee <derrickstolee@github.com>
Date
Nov 8, 2022, 00:02 UTC
Message-ID
<e185dc68-4a01-da57-8c68-a14448f9173f@github.com>
In-Reply-To
<221108.8635autlha.gmgdl@evledraar.gmail.com>
On 11/7/2022 5:56 PM, Ævar Arnfjörð Bjarmason wrote:
Show 6 quoted lines
> 
> On Mon, Nov 07 2022, Derrick Stolee wrote:
> 
>> On 11/7/22 4:03 PM, Ævar Arnfjörð Bjarmason wrote:
>>>
>>> On Mon, Nov 07 2022, Derrick Stolee wrote:
Show 13 quoted lines
>>>> Either of these points may have an incorrect assumption, so
>>>> I'm prepared to be wrong.
>>>
>>> I *think* you're wrong about #2, but I'm not sure either.
>>
>> At the very least, the configurable option requires fetching the
>> repo and checking out at least one file. I don't know how much it
>> actually saves one way or another.
> 
> It's already fetching the ci-config repo, so we're talking about the
> marginal cost of running the bit of shellscript to check if
> config-repo/ci/config/skip-concurrent is executable, and if not keeping
> the default config.
Show 6 quoted lines
>> I wonder how we could determine this. Should we run a few CI
>> jobs with some force-pushes in either approach (config turned
>> off) so we know that cost?
> 
> The incremental cost of that "test -x", or...? I'm not sure what you
> mean here.

The difference is that setting the concurrency globally allows Actions to decide the concurrency from the workflow file alone, before any jobs are run. This is done without a clone.

The method introduced in e76eec35540 (ci: allow per-branch config for GitHub Actions, 2020-05-07) requires running the ci-config job at minimum to set the concurrency value, which involves doing a (very small, shallow) clone of the ci-config branch to determine if that file exists.

Since this is the first job to run in the workflow, the global concurrency will only reduces the amount of compute consumed when pushes happen close together, but that is included for "oops I forgot to --amend" and other common cases.

At the very least, the difference between the two mechanisms is greater than a 'test -x'.

Thanks, -Stolee

Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 18 of 20 in “ci: avoid unnecessary builds”
  1. ci: avoid unnecessary buildsJohannes Schindelin via GitGitGadget, Nov 3, 2022
  2. Ævar Arnfjörð BjarmasonNov 4, 2022
  3. Taylor BlauNov 4, 2022
  4. Jeff KingNov 4, 2022
  5. Johannes SchindelinNov 8, 2022
  6. Jeff KingNov 9, 2022
  7. Taylor BlauNov 10, 2022
  8. Taylor BlauNov 4, 2022
  9. Derrick StoleeNov 7, 2022
  10. Taylor BlauNov 7, 2022
  11. Derrick StoleeNov 7, 2022
  12. Ævar Arnfjörð BjarmasonNov 7, 2022
  13. Derrick StoleeNov 7, 2022
  14. Taylor BlauNov 7, 2022
  15. Johannes SchindelinNov 8, 2022
  16. Taylor BlauNov 8, 2022
  17. Ævar Arnfjörð BjarmasonNov 7, 2022
  18. Derrick StoleeNov 8, 2022
  19. Junio C HamanoNov 8, 2022
  20. Johannes SchindelinNov 8, 2022

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.