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

Re: [PATCH] install meson for Documentation job

From
Karthik Nayak <karthik.188@gmail.com>
Date
Mar 18, 2025, 16:19 UTC
Message-ID
<CAOLa=ZRODjYfDXQ8m+hDosV7RBGDWeehzSvsR-+-HCmbS+tAcQ@mail.gmail.com>
In-Reply-To
<xmqqmsdi49h8.fsf_-_@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 37 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Jeff King <peff@peff.net> writes:
>>
>>> On Fri, Mar 14, 2025 at 10:36:39AM -0700, Junio C Hamano wrote:
>>>
>>>> * ps/ci-meson-check-build-docs (2025-03-12) 1 commit
>>>>  - ci: perform build and smoke tests for Meson docs
>>>>
>>>>  CI update.
>>>>
>>>>  Will merge to 'next'.
>>>>  source: <20250312-b4-pks-ci-meson-docs-v1-1-5e7cf7ac959a@pks.im>
>>>
>>> I didn't dig into it, but I'd imagine this topic is the source of CI
>>> failures on the "documentation" job like this:
>>>
>>>   2025-03-14T17:50:13.8749066Z + meson setup build-asciidoc -Ddocs=html,man -Ddocs_backend=asciidoc
>>>   2025-03-14T17:50:13.8752287Z ci/test-documentation.sh: line 50: meson: command not found
>>>   2025-03-14T17:50:13.8769502Z ##[error]Process completed with exit code 127.
>>>
>>> that I'm seeing in jch (and looks like you have a similar one in the
>>> latest build of 'seen')
>>>
>>> -Peff
>>
>> Somebody more clueful than me about how the CI dependency set-up is
>> supposed to happen should rewrite the proposed log message
>> altogether.  The install-dependencies script pretends as if two
>> case..esac blocks are orthogonal (the former switches on $distro,
>> the latter that we see in the patch switches on $jobname), but I
>> somehow do not get the feeling that we can move Documentation job
>> from ubuntu-latest to alpine-latest for example.
>
> Ping?  Anybody wants to help explain how this part of CI works to
> the commit log message?
>

Weird. From the looks of https://github.com/git/git/actions/runs/13867157977/job/38808418127, it seems like the '$distro' variable in 'ci/install-dependencies.sh' is not being correctly initialized. We can see this in the logs of the CI:

  CI setup via install-dependencies.sh
    + set -e
    + export TERM=dumb
    + export MAKEFLAGS=
    + test true = true
    + CI_TYPE=github-actions
    + CI_BRANCH=refs/heads/seen
    + CI_COMMIT=d5389e37e21d864f40f4167280db799ffe8983c2
    + echo Linux
    + tr A-Z a-z
    + CI_OS_NAME=linux
    + test macos != linux
    + CI_REPO_SLUG=git/git
    + CI_JOB_ID=13867157977
    + CC=gcc
    + DONT_SKIP_TAGS=t
    + cache_dir=/home/runner/none
    + GIT_TEST_OPTS=--github-workflow-markup
    + JOBS=10
    + echo
    + tr : -
    + distro=
    ...

So in 'ci/lib.sh' we set `distro=$(echo "$CI_JOB_IMAGE" | tr : -)`. So this means the distro is based on '$CI_JOB_IMAGE' env variable.

From '.github/workflows/main.yml' we can see that this is not set for the 'Documentation' job. I'm not sure why this the way it is though. I didn't look into the history.

An untested fix, which should fix (is it a bug?) the root cause:
-- 8< --
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9959b61ece..2679a32508 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -473,6 +473,7 @@ jobs:
       cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent
== 'yes' }}
     env:
       jobname: Documentation
+      CI_JOB_IMAGE: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v4


>> In any case, the change seems to "fix" the issue for me
>>
>> (bad)
>> https://github.com/git/git/actions/runs/13867157977/job/38808418127
>>
>> (good)
>> https://github.com/git/git/actions/runs/13867208725/job/38808554478
>>
>>
>> Thanks.
>>
>> --- >8 ---
>> Subject: [PATCH] install meson for Documentation job
>>
>> Why should we even do this?  Doesn't it run on ubuntu-latest which
>> has its own apt--get install for meson in the $distro specific
>> set-up before this part?
>>
>>
>> ---
>>  ci/install-dependencies.sh | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
>> index 0df74610d0..fdeeaabaca 100755
>> --- a/ci/install-dependencies.sh
>> +++ b/ci/install-dependencies.sh
>> @@ -123,7 +123,7 @@ sparse)
>>  	;;
>>  Documentation)
>>  	sudo apt-get -q update
>> -	sudo apt-get -q -y install asciidoc xmlto docbook-xsl-ns make
>> +	sudo apt-get -q -y install asciidoc xmlto docbook-xsl-ns make meson
>>
>>  	test -n "$ALREADY_HAVE_ASCIIDOCTOR" ||
>>  	sudo gem install --version 1.5.8 asciidoctor
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 15 in “What's cooking in git.git (Mar 2025, #04; Fri, 14)”
  1. Junio C HamanoMar 14, 2025
  2. Jeff KingMar 14, 2025
  3. Jeff KingMar 14, 2025
  4. Junio C HamanoMar 15, 2025
  5. install meson for Documentation jobJunio C Hamano, Mar 18, 2025
  6. Karthik NayakMar 18, 2025
  7. Junio C HamanoMar 18, 2025
  8. Patrick SteinhardtMar 19, 2025
  9. Karthik NayakMar 19, 2025
  10. ci/github: add missing 'CI_JOB_IMAGE' env variableKarthik Nayak, Mar 19, 2025
  11. Patrick SteinhardtMar 20, 2025
  12. Junio C HamanoMar 21, 2025
  13. Junio C HamanoMar 20, 2025
  14. en/diff-rename-follow-fix (Was: Re: What's cooking in git.git (Mar 2025, #04; Fri, 14))Elijah Newren, Mar 15, 2025
  15. Junio C HamanoMar 15, 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.