Re: [PATCH v4 03/10] github: adapt containerized jobs to be rootless
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 17, 2025, 17:30 UTC
- Message-ID
- <dda1d862-b5e2-9928-111c-fff519f6e00b@gmx.de>
- In-Reply-To
- <e45b9487-b3ae-ed85-fd07-c92cfbf47cbb@gmx.de>
Hi Patrick, me again,
On Thu, 28 Aug 2025, Johannes Schindelin wrote:
Show 60 quoted lines
> On Fri, 10 Jan 2025, Patrick Steinhardt wrote: > > > diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml > > index 900be9957a23fcaa64e1aefd0c8638c5f84b7997..b02f5873a540b458d38e7951b4ee3d5ca598ae23 100644 > > --- a/.github/workflows/main.yml > > +++ b/.github/workflows/main.yml > > @@ -371,10 +371,12 @@ jobs: > > run: apt -q update && apt -q -y install libc6-amd64 lib64stdc++6 > > - uses: actions/checkout@v4 > > - run: ci/install-dependencies.sh > > - - run: ci/run-build-and-tests.sh > > + - run: useradd builder --create-home > > + - run: chown -R builder . > > + - run: sudo --preserve-env --set-home --user=builder ci/run-build-and-tests.sh > > I am afraid that this is not enough. Sure, it works as long as the tests > are passing, but the entire point of running the tests is to catch _and > debug_ when they are failing. Otherwise a lot of money and effort could be > saved simply by deleting those tests. > > When the tests are failing, the detailed test logs are supposed to be > shown, but as I noticed most recently in > https://github.com/microsoft/git/actions/runs/17278881863/job/49042596457?pr=787#step:9:1933 > there is a fatal error that prevents them from being shown let alone > uploaded: > > [...] > Test Summary Report > ------------------- > t5799-gvfs-helper.sh (Wstat: 256 Tests: 36 Failed: 1) > Failed test: 25 > Non-zero exit status: 1 > Files=1040, Tests=31137, 543 wallclock secs ( 8.01 usr 2.16 sys + 611.98 cusr 1100.12 csys = 1722.27 CPU) > Result: FAIL > make[1]: *** [Makefile:78: prove] Error 1 > ++ cat exit.status > make[1]: Leaving directory '/__w/git/git/t' > make: *** [Makefile:3362: test] Error 2 > + res=2 > + rm exit.status > + end_group 'Run tests' > + test -n t > + set +x > ci/lib.sh: line 221: /__w/_temp/_runner_file_commands/set_env_cca39642-cc57-484c-b7d4-27bbd4dc8260: Permission denied > Error: Process completed with exit code 1. > > This error causes the next two steps to be skipped, the one that is > supposed to show the detailed test logs, and the one to upload the failed > tests' directories, precluding any further attempt at debugging the test > failures. Even the part of that step that is supposed to show the failed > _test case's_ logs, as a last resort, fails to show anything because it is > skipped because of that error, too. > > Due to various reasons, I cannot investigate this any further. At the same > time, I suspect that you need some hack like adding the `builder` user to > some group that has write access to `/__w/_temp/` (which is most likely a > Docker volume that maps to the host's `$RUNNER_TEMP` or some such, and > therefore a `chmod` is unlikely to work, or it might lead to unintended > consequences in later steps of thw workflow) to allow the logic to perform > as desired.
I have contributed a patch for that via https://lore.kernel.org/git/pull.2003.git.1763399064983.gitgitgadget@gmail.com/. Unfortunately, I forgot to Cc: you, please accept my apologies for that oversight.
Ciao, Johannes