CI behaving differently from local tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm looking at why the set-head series (cf.:
https://lore.kernel.org/git/20241014225431.1394565-1-bence@xxxxxxxxxxxxxx/)
breaks the CI. The problem stems from the local test repositories being set up
differently from that of the CI.

I ran both the CI and a local test on current master with the following patch
applied on top, i.e. I print all remote refs and intentionally break the test
so that the result is easy to get from the CI:

diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 532035933f..d625a3a8b6 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -724,8 +724,11 @@ test_expect_success 'update' '
 		cd one &&
 		git remote add drosophila ../two &&
 		git remote add apis ../mirror &&
+		git ls-remote drosophila &&
+		git ls-remote apis &&
 		git remote update &&
 		git branch -r >output &&
+		echo "force error" >output &&
 		test_cmp expect output
 	)
 '

The CI gives the following output:
https://github.com/ferdinandyb/git/actions/runs/11392309625/job/31698105287


    + git ls-remote drosophila
    9d34b142e42f6b3dbab46dd4b9bc515e0ab16101       HEAD
    9d34b142e42f6b3dbab46dd4b9bc515e0ab16101       refs/heads/another
    9d34b142e42f6b3dbab46dd4b9bc515e0ab16101       refs/heads/main
    2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f       refs/heads/side
    + git ls-remote apis
    6329a3ca5268a0b28a1dc29b602e8b72a0bc1b37       HEAD
    6329a3ca5268a0b28a1dc29b602e8b72a0bc1b37       refs/heads/main
    2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f       refs/heads/side


While from ./t5505-remote.sh -v I get:

    9d34b142e42f6b3dbab46dd4b9bc515e0ab16101        HEAD
    9d34b142e42f6b3dbab46dd4b9bc515e0ab16101        refs/heads/another
    9d34b142e42f6b3dbab46dd4b9bc515e0ab16101        refs/heads/main
    2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f        refs/heads/side
    6329a3ca5268a0b28a1dc29b602e8b72a0bc1b37        refs/heads/main
    2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f        refs/heads/side

Since `git remote update` here is essentially running `git fetch --multiple --all`,
with the set-head series applied we're attempting to set HEAD for both
remotes. Obviously, this fails locally and succeeds in the CI, which is
actually the patch series behaving as intended, but obviously a drift between
the local and the CI testing environments.

I'm probably too tired right now, but I don't see how or what could make the
mirror repo be different depending on having it locally or in the CI ... At
least I know it's definitely not my patch series :) Does anyone have an idea
what to try and look into?

I guess ideally the fix for this would be added to the beginning of the series
so we can continue with both local and CI tests working. (Although it could be
marked as a know breakage as well, not so elegant).

Thanks,
Bence


-- 
bence.ferdinandy.com






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux