Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go/internal/modfetch/codehost: TestStat/gitrepo1 failures due to missing v1.2.3 tag #56881

Closed
gopherbot opened this issue Nov 21, 2022 · 27 comments
Assignees
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. GoCommand cmd/go modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@gopherbot
Copy link
Contributor

gopherbot commented Nov 21, 2022

#!watchflakes
post <- ((pkg == "cmd/go/internal/modfetch/codehost" && test == "TestStat") || pkg == "lock") && `incorrect info` && `Tags:\[v1.2.4-annotated\]`

Issue created automatically to collect these failures.

Example (log):

--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.04s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
cd /workdir/tmp/gitrepo-test-3263890906/modcache/cache/vcs/90c649521c3e04bb5c78aa911f4a95d17d08361f58229e59677eea387ebdf976; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
0.120s # cd /workdir/tmp/gitrepo-test-3263890906/modcache/cache/vcs/90c649521c3e04bb5c78aa911f4a95d17d08361f58229e59677eea387ebdf976; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
cd /workdir/tmp/gitrepo-test-3263890906/modcache/cache/vcs/90c649521c3e04bb5c78aa911f4a95d17d08361f58229e59677eea387ebdf976; hg cat -r v2.3.4 another.txt
0.116s # cd /workdir/tmp/gitrepo-test-3263890906/modcache/cache/vcs/90c649521c3e04bb5c78aa911f4a95d17d08361f58229e59677eea387ebdf976; hg cat -r v2.3.4 another.txt

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 21, 2022
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "cmd/go/internal/modfetch/codehost" && test == "TestStat"
2022-11-19 01:19 linux-amd64-longtest go@c6cdfd88 cmd/go/internal/modfetch/codehost.TestStat (log)
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.04s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
cd /workdir/tmp/gitrepo-test-3263890906/modcache/cache/vcs/90c649521c3e04bb5c78aa911f4a95d17d08361f58229e59677eea387ebdf976; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
0.120s # cd /workdir/tmp/gitrepo-test-3263890906/modcache/cache/vcs/90c649521c3e04bb5c78aa911f4a95d17d08361f58229e59677eea387ebdf976; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
cd /workdir/tmp/gitrepo-test-3263890906/modcache/cache/vcs/90c649521c3e04bb5c78aa911f4a95d17d08361f58229e59677eea387ebdf976; hg cat -r v2.3.4 another.txt
0.116s # cd /workdir/tmp/gitrepo-test-3263890906/modcache/cache/vcs/90c649521c3e04bb5c78aa911f4a95d17d08361f58229e59677eea387ebdf976; hg cat -r v2.3.4 another.txt
2022-11-19 22:39 linux-amd64-longtest go@bda02354 cmd/go/internal/modfetch/codehost.TestStat (log)
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.08s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg log -l1 -r v2.3.4 --template '{node} {date|hgdate} {tags}'
0.174s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg log -l1 -r v2.3.4 --template '{node} {date|hgdate} {tags}'
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg cat -r v2.3.4 another.txt
0.176s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg cat -r v2.3.4 another.txt
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
0.181s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg tags -q
0.156s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg tags -q
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
0.174s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r aaaaaaaaab --prefix=prefix/ -- /workdir/tmp/go-readzip-1941230597.zip
0.159s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r aaaaaaaaab --prefix=prefix/ -- /workdir/tmp/go-readzip-1941230597.zip
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -I 'v3/sub/**' -- /workdir/tmp/go-readzip-2854678986.zip
0.174s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -I 'v3/sub/**' -- /workdir/tmp/go-readzip-2854678986.zip
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -I 'v3/sub/dir/**' -- /workdir/tmp/go-readzip-3176493673.zip
0.178s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -I 'v3/sub/dir/**' -- /workdir/tmp/go-readzip-3176493673.zip
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r v2 --prefix=prefix/ -- /workdir/tmp/go-readzip-3081377258.zip
0.186s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r v2 --prefix=prefix/ -- /workdir/tmp/go-readzip-3081377258.zip
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -- /workdir/tmp/go-readzip-1851024535.zip
0.180s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -- /workdir/tmp/go-readzip-1851024535.zip
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r v2.3.4 --prefix=prefix/ -- /workdir/tmp/go-readzip-412968684.zip
0.181s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg archive -t zip --no-decode -r v2.3.4 --prefix=prefix/ -- /workdir/tmp/go-readzip-412968684.zip
cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg cat -r tip README
0.179s # cd /workdir/tmp/gitrepo-test-1245285992/modcache/cache/vcs/e7af6309e287ee4fc5e451990b13fa9bf15b20498226d8e55d1818f853fc3751; hg cat -r tip README

watchflakes

@bcmills bcmills self-assigned this Nov 21, 2022
@bcmills bcmills added this to the Go1.21 milestone Nov 21, 2022
@bcmills bcmills changed the title cmd/go/internal/modfetch/codehost: TestStat failures cmd/go/internal/modfetch/codehost: TestStat/gitrepo1/v1.2.4-annotated failures due to missing v1.2.3 tag Nov 21, 2022
@bcmills bcmills changed the title cmd/go/internal/modfetch/codehost: TestStat/gitrepo1/v1.2.4-annotated failures due to missing v1.2.3 tag cmd/go/internal/modfetch/codehost: TestStat/gitrepo1 failures due to missing v1.2.3 tag Jan 17, 2023
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- ((pkg == "cmd/go/internal/modfetch/codehost" && test == "TestStat") || pkg == "lock") && `incorrect info` && `Tags:\[v1.2.4-annotated\]`
2023-01-09 18:21 linux-386-longtest go@8232a09e cmd/go/internal/modfetch/codehost.TestStat (log)
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.10s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
    --- FAIL: TestStat/gitrepo1/ede458df (0.03s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
    --- FAIL: TestStat/gitrepo1/HEAD (0.11s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg log -l1 -r v2.3.4 --template '{node} {date|hgdate} {tags}'
0.130s # cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg log -l1 -r v2.3.4 --template '{node} {date|hgdate} {tags}'
cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg cat -r v2.3.4 another.txt
0.120s # cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg cat -r v2.3.4 another.txt
cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg log -l1 -r v2 --template '{node} {date|hgdate} {tags}'
0.126s # cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg log -l1 -r v2 --template '{node} {date|hgdate} {tags}'
cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
0.119s # cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg cat -r v2 another.txt
0.114s # cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg cat -r v2 another.txt
cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg cat -r tip README
0.127s # cd /workdir/tmp/gitrepo-test-1083120334/modcache/cache/vcs/7d80be9f054f30b7c578b41150eaca532b2335d6ad732bc6403e95383abf14f7; hg cat -r tip README
2023-01-17 19:47 linux-386-longtest go@83f86889 cmd/go/internal/modfetch/codehost.TestStat (log)
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.08s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
    --- FAIL: TestStat/gitrepo1/HEAD (0.10s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
...
cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg archive -t zip --no-decode -r v2.3.4 --prefix=prefix/ -- /workdir/tmp/go-readzip-657819250.zip
0.190s # cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg archive -t zip --no-decode -r v2.3.4 --prefix=prefix/ -- /workdir/tmp/go-readzip-657819250.zip
cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -I 'v3/sub/dir/**' -- /workdir/tmp/go-readzip-3222983223.zip
0.178s # cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -I 'v3/sub/dir/**' -- /workdir/tmp/go-readzip-3222983223.zip
cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg archive -t zip --no-decode -r v2 --prefix=prefix/ -- /workdir/tmp/go-readzip-554790635.zip
0.180s # cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg archive -t zip --no-decode -r v2 --prefix=prefix/ -- /workdir/tmp/go-readzip-554790635.zip
cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg cat -r v2.3.4 another.txt
0.182s # cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg cat -r v2.3.4 another.txt
cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg cat -r tip README
0.176s # cd /workdir/tmp/gitrepo-test-3323996501/modcache/cache/vcs/af14e60b66954b9509dad50a0ff64bc4aabac1aee5682f46ba764a04a555bf3c; hg cat -r tip README
2023-02-22 14:55 linux-amd64-longtest-race go@4a1829b6 cmd/go/internal/modfetch/codehost.TestStat (log)
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.06s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
0.138s # cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg log -l1 -r tip --template '{node} {date|hgdate} {tags}'
cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg tags -q
0.124s # cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg tags -q
cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg cat -r tip README
0.134s # cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg cat -r tip README
cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -I 'v3/sub/**' -- /workdir/tmp/go-readzip-1148004419.zip
0.139s # cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -I 'v3/sub/**' -- /workdir/tmp/go-readzip-1148004419.zip
cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r aaaaaaaaab --prefix=prefix/ -- /workdir/tmp/go-readzip-387769255.zip
0.127s # cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r aaaaaaaaab --prefix=prefix/ -- /workdir/tmp/go-readzip-387769255.zip
cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -- /workdir/tmp/go-readzip-3722624346.zip
0.139s # cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -- /workdir/tmp/go-readzip-3722624346.zip
cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -I 'v3/sub/dir/**' -- /workdir/tmp/go-readzip-3663286371.zip
0.136s # cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r v3 --prefix=prefix/ -I 'v3/sub/dir/**' -- /workdir/tmp/go-readzip-3663286371.zip
cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r v2 --prefix=prefix/ -- /workdir/tmp/go-readzip-3801994944.zip
0.143s # cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r v2 --prefix=prefix/ -- /workdir/tmp/go-readzip-3801994944.zip
cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r v2.3.4 --prefix=prefix/ -- /workdir/tmp/go-readzip-527844795.zip
0.141s # cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg archive -t zip --no-decode -r v2.3.4 --prefix=prefix/ -- /workdir/tmp/go-readzip-527844795.zip
cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg cat -r v2.3.4 another.txt
0.135s # cd /workdir/tmp/gitrepo-test-4269323282/modcache/cache/vcs/4463bcc65ac6e3216b3a81ab6e0e2ff05b93fc799f16a606c7868cff51c652fa; hg cat -r v2.3.4 another.txt
2023-02-24 19:00 linux-arm64-longtest go@21ff6704 cmd/go/internal/modfetch/codehost.TestStat (log)
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.16s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
    --- FAIL: TestStat/gitrepo1/HEAD (0.16s)
        git_test.go:600: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}

watchflakes

@bcmills
Copy link
Contributor

bcmills commented May 4, 2023

I'm going to add a skip for this failure mode first thing tomorrow. It seems to have a delightfully high repro rate on the linux-amd64-race builder.

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/492975 mentions this issue: cmd/go/internal/modfetch/codehost: skip tests that fail due to tag mismatches

gopherbot pushed a commit that referenced this issue May 5, 2023
…smatches

For #56881.

Change-Id: If9d8fa2942e4dd8da5e673631cdc277e0fe6c962
Reviewed-on: https://go-review.googlesource.com/c/go/+/492975
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
@bcmills bcmills unpinned this issue May 5, 2023
@bcmills bcmills modified the milestones: Go1.21, Go1.22 Jun 20, 2023
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/547155 mentions this issue: cmd/go/internal/modfetch/codehost: add new git tags before statLocal instead of after

gopherbot pushed a commit that referenced this issue Dec 6, 2023
…instead of after

gitRepo.statLocal reports tag and version information.
If we are statting a hash that corresponds to a tag, we need to add that tag
before calling statLocal so that it can be included in that information.

Fixes #53955.
Updates #56881.

Change-Id: I69a71428e6ed9096d4cb8ed1bb79531415ff06c1
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/547155
Auto-Submit: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
@bcmills
Copy link
Contributor

bcmills commented Dec 13, 2023

I think this may be a git bug: I can't reproduce it at all on my Linux workstation, but it fails right off the bat on a linux-amd64-longtest gomote instance:

root@buildlet-linux-amd64-bullseye-rnb4ea69f:/workdir/go/src# while ../bin/go test cmd/go/internal/modfetch/codehost -count=1 -run='.*/gitrepo1/.*' ; do true ; done
ok      cmd/go/internal/modfetch/codehost       0.270s
ok      cmd/go/internal/modfetch/codehost       0.293s
ok      cmd/go/internal/modfetch/codehost       0.259s
vcs-test.golang.org rerouted to http://127.0.0.1:36903
https://vcs-test.golang.org rerouted to https://127.0.0.1:39145
--- FAIL: TestLatest (0.08s)
    --- FAIL: TestLatest/gitrepo1 (0.00s)
        git_test.go:283: Latest: incorrect info
            have &{Origin:0xc000292180 Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]} (origin &{VCS:git URL:http://127.0.0.1:36903/git/gitrepo1 Subdir: Hash:ede458df7cd0fdca520df19a33158086a8a68e81 TagPrefix: TagSum: Ref:HEAD RepoSum:})
            want &{Origin:0xc00003dc80 Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]} (origin &{VCS:git URL:http://127.0.0.1:36903/git/gitrepo1 Subdir: Hash:ede458df7cd0fdca520df19a33158086a8a68e81 TagPrefix: TagSum: Ref:HEAD RepoSum:})
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.04s)
        git_test.go:661: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
FAIL
FAIL    cmd/go/internal/modfetch/codehost       0.259s
FAIL

@bcmills
Copy link
Contributor

bcmills commented Dec 13, 2023

vcs-test.golang.org rerouted to http://127.0.0.1:39243
https://vcs-test.golang.org rerouted to https://127.0.0.1:41957
=== RUN   TestTags
=== PAUSE TestTags
=== RUN   TestLatest
=== PAUSE TestLatest
=== RUN   TestReadFile
=== PAUSE TestReadFile
=== RUN   TestReadZip
=== PAUSE TestReadZip
=== RUN   TestStat
=== PAUSE TestStat
=== CONT  TestTags
=== RUN   TestTags/gitrepo1/xxx
=== PAUSE TestTags/gitrepo1/xxx
=== CONT  TestReadZip
=== RUN   TestReadZip/gitrepo1/v2.3.4/
=== PAUSE TestReadZip/gitrepo1/v2.3.4/
=== CONT  TestStat
=== RUN   TestStat/gitrepo1/HEAD
=== PAUSE TestStat/gitrepo1/HEAD
=== CONT  TestReadFile
=== RUN   TestReadFile/gitrepo1/latest/README
=== PAUSE TestReadFile/gitrepo1/latest/README
=== RUN   TestReadFile/gitrepo1/v2/another.txt
=== PAUSE TestReadFile/gitrepo1/v2/another.txt
=== RUN   TestReadFile/gitrepo1/v2.3.4/another.txt
=== CONT  TestLatest
=== PAUSE TestReadFile/gitrepo1/v2.3.4/another.txt
=== RUN   TestReadZip/gitrepo1/v2/
=== PAUSE TestReadZip/gitrepo1/v2/
=== RUN   TestLatest/gitrepo1
=== PAUSE TestLatest/gitrepo1
=== RUN   TestReadZip/gitrepo1/v3/
=== PAUSE TestReadZip/gitrepo1/v3/
=== RUN   TestReadZip/gitrepo1/v3/v3/sub/dir
=== PAUSE TestReadZip/gitrepo1/v3/v3/sub/dir
=== RUN   TestReadZip/gitrepo1/v3/v3/sub
=== PAUSE TestReadZip/gitrepo1/v3/v3/sub
=== RUN   TestReadZip/gitrepo1/aaaaaaaaab/
=== PAUSE TestReadZip/gitrepo1/aaaaaaaaab/
git clone --mirror http://127.0.0.1:39243/git/gitrepo1 /tmp/gitrepo-test-3061025134/gitrepo2
=== CONT  TestReadZip/gitrepo1/v2.3.4/
    git_test.go:166: mkdir -p /tmp/gitrepo-test-3061025134/modcache/cache/vcs # git3 http://127.0.0.1:39243/git/gitrepo1
=== RUN   TestTags/gitrepo1/
=== CONT  TestReadZip/gitrepo1/v3/v3/sub
=== PAUSE TestTags/gitrepo1/
=== NAME  TestReadZip/gitrepo1/v2.3.4/
    git_test.go:166: # lock /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2.lock
=== CONT  TestReadZip/gitrepo1/v3/
=== CONT  TestReadZip/gitrepo1/v3/v3/sub/dir
=== CONT  TestReadZip/gitrepo1/v2/
=== NAME  TestReadZip/gitrepo1/v2.3.4/
    git_test.go:166: mkdir -p /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2 # git3 http://127.0.0.1:39243/git/gitrepo1
=== RUN   TestStat/gitrepo1/v2
=== PAUSE TestStat/gitrepo1/v2
=== NAME  TestReadZip/gitrepo1/v2.3.4/
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git init --bare
=== CONT  TestReadFile/gitrepo1/latest/README
=== CONT  TestReadFile/gitrepo1/v2.3.4/another.txt
=== CONT  TestReadFile/gitrepo1/v2/another.txt
=== RUN   TestTags/gitrepo1/v
=== PAUSE TestTags/gitrepo1/v
=== CONT  TestReadZip/gitrepo1/aaaaaaaaab/
=== RUN   TestStat/gitrepo1/v2.3.4
=== PAUSE TestStat/gitrepo1/v2.3.4
=== RUN   TestTags/gitrepo1/v1
=== PAUSE TestTags/gitrepo1/v1
=== RUN   TestTags/gitrepo1/2
=== PAUSE TestTags/gitrepo1/2
=== RUN   TestStat/gitrepo1/v2.3
=== CONT  TestTags/gitrepo1/v
=== CONT  TestTags/gitrepo1/
=== PAUSE TestStat/gitrepo1/v2.3
=== CONT  TestTags/gitrepo1/xxx
=== RUN   TestStat/gitrepo1/v1.2.3
=== PAUSE TestStat/gitrepo1/v1.2.3
=== CONT  TestTags/gitrepo1/2
=== CONT  TestTags/gitrepo1/v1
=== RUN   TestStat/gitrepo1/ede458df
=== PAUSE TestStat/gitrepo1/ede458df
=== RUN   TestStat/gitrepo1/97f6aa59
=== PAUSE TestStat/gitrepo1/97f6aa59
=== RUN   TestStat/gitrepo1/v1.2.4-annotated
=== PAUSE TestStat/gitrepo1/v1.2.4-annotated
=== RUN   TestStat/gitrepo1/aaaaaaaaab
=== PAUSE TestStat/gitrepo1/aaaaaaaaab
=== CONT  TestStat/gitrepo1/HEAD
=== NAME  TestReadZip/gitrepo1/v2.3.4/
    git_test.go:166: 0.003s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git init --bare
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git remote add origin -- http://127.0.0.1:39243/git/gitrepo1
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git remote add origin -- http://127.0.0.1:39243/git/gitrepo1
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git tag -l
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git tag -l
=== NAME  TestReadFile/gitrepo1/latest/README
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git ls-remote -q origin
2023/12/13 22:19:21 serving /git/gitrepo1/info/refs?service=git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/info/refs?service=git-upload-pack
2023/12/13 22:19:21 gitrepo1.txt:
> handle git
> env GIT_AUTHOR_NAME='Russ Cox'
> env GIT_AUTHOR_EMAIL='rsc@golang.org'
> env GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
> env GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
> git init
[stdout]
Initialized empty Git repository in /tmp/vcstest820836370/git/gitrepo1/.git/
> at 2018-04-17T15:43:22-04:00
> unquote ''
> cp stdout README
> git add README
> git commit -a -m 'empty README'
[stdout]
[main (root-commit) ede458d] empty README
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 README
> git branch -m master
> git tag v1.2.3
> at 2018-04-17T15:45:48-04:00
> git branch v2
> git checkout v2
[stderr]
Switched to branch 'v2'
> echo 'v2'
[stdout]
v2
> cp stdout v2
> git add v2
> git commit -a -m 'v2'
[stdout]
[v2 76a00fb] v2
 1 file changed, 1 insertion(+)
 create mode 100644 v2
> git tag v2.3
> git tag v2.0.1
> git branch v2.3.4
> at 2018-04-17T16:00:19-04:00
> echo 'intermediate'
[stdout]
intermediate
> cp stdout foo.txt
> git add foo.txt
> git commit -a -m 'intermediate'
[stdout]
[v2 97f6aa5] intermediate
 1 file changed, 1 insertion(+)
 create mode 100644 foo.txt
> at 2018-04-17T16:00:32-04:00
> echo 'another'
[stdout]
another
> cp stdout another.txt
> git add another.txt
> git commit -a -m 'another'
[stdout]
[v2 9d02800] another
 1 file changed, 1 insertion(+)
 create mode 100644 another.txt
> git tag v2.0.2
> at 2018-04-17T16:16:52-04:00
> git checkout master
[stderr]
Switched to branch 'master'
> git branch v3
> git checkout v3
[stderr]
Switched to branch 'v3'
> mkdir v3/sub/dir
> echo 'v3/sub/dir/file'
[stdout]
v3/sub/dir/file
> cp stdout v3/sub/dir/file.txt
> git add v3
> git commit -a -m 'add v3/sub/dir/file.txt'
[stdout]
[v3 a8205f8] add v3/sub/dir/file.txt
 1 file changed, 1 insertion(+)
 create mode 100644 v3/sub/dir/file.txt
> at 2018-04-17T22:23:00-04:00
> git checkout master
[stderr]
Switched to branch 'master'
> git tag -a v1.2.4-annotated -m 'v1.2.4-annotated'
> git show-ref --tags --heads
[stdout]
ede458df7cd0fdca520df19a33158086a8a68e81 refs/heads/master
9d02800338b8a55be062c838d1f02e0c5780b9eb refs/heads/v2
76a00fb249b7f93091bc2c89a789dab1fc1bc26f refs/heads/v2.3.4
a8205f853c297ad2c3c502ba9a355b35b7dd3ca5 refs/heads/v3
ede458df7cd0fdca520df19a33158086a8a68e81 refs/tags/v1.2.3
b004e48a345a86ed7a2fb7debfa7e0b2f9b0dd91 refs/tags/v1.2.4-annotated
76a00fb249b7f93091bc2c89a789dab1fc1bc26f refs/tags/v2.0.1
9d02800338b8a55be062c838d1f02e0c5780b9eb refs/tags/v2.0.2
76a00fb249b7f93091bc2c89a789dab1fc1bc26f refs/tags/v2.3
> cmp stdout .git-refs

    git_test.go:166: 0.050s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git ls-remote -q origin
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
=== CONT  TestStat/gitrepo1/aaaaaaaaab
=== CONT  TestStat/gitrepo1/v1.2.4-annotated
=== CONT  TestStat/gitrepo1/97f6aa59
=== CONT  TestStat/gitrepo1/ede458df
--- PASS: TestTags (0.00s)
    --- PASS: TestTags/gitrepo1/v (0.06s)
    --- PASS: TestTags/gitrepo1/ (0.06s)
    --- PASS: TestTags/gitrepo1/xxx (0.06s)
    --- PASS: TestTags/gitrepo1/2 (0.06s)
    --- PASS: TestTags/gitrepo1/v1 (0.06s)
=== CONT  TestStat/gitrepo1/v1.2.3
=== NAME  TestReadFile/gitrepo1/latest/README
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
=== NAME  TestReadZip/gitrepo1/aaaaaaaaab/
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' aaaaaaaaab --
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' aaaaaaaaab --
=== NAME  TestStat/gitrepo1/97f6aa59
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' 97f6aa59 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' 97f6aa59 --
=== NAME  TestStat/gitrepo1/ede458df
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df --
=== NAME  TestStat/gitrepo1/v1.2.4-annotated
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f --depth=1 origin refs/tags/v1.2.4-annotated:refs/tags/v1.2.4-annotated
2023/12/13 22:19:21 serving /git/gitrepo1/info/refs?service=git-upload-pack
0.072s # git clone --mirror http://127.0.0.1:39243/git/gitrepo1 /tmp/gitrepo-test-3061025134/gitrepo2
cd /tmp/gitrepo-test-3061025134/gitrepo2; git config daemon.uploadarch true
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
0.001s # cd /tmp/gitrepo-test-3061025134/gitrepo2; git config daemon.uploadarch true
=== CONT  TestStat/gitrepo1/v2.3
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
=== NAME  TestStat/gitrepo1/v1.2.4-annotated
    git_test.go:166: 0.024s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f --depth=1 origin refs/tags/v1.2.4-annotated:refs/tags/v1.2.4-annotated
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' refs/tags/v1.2.4-annotated --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' refs/tags/v1.2.4-annotated --
=== NAME  TestReadZip/gitrepo1/v2.3.4/
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' 76a00fb249b7f93091bc2c89a789dab1fc1bc26f --
=== NAME  TestStat/gitrepo1/v1.2.4-annotated
    git_test.go:661: Stat: incorrect info
        have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
        want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
=== CONT  TestStat/gitrepo1/v2.3.4
=== NAME  TestReadZip/gitrepo1/v2.3.4/
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' 76a00fb249b7f93091bc2c89a789dab1fc1bc26f --
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f --depth=1 origin refs/heads/v2.3.4:refs/heads/v2.3.4
2023/12/13 22:19:21 serving /git/gitrepo1/info/refs?service=git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
    git_test.go:166: 0.027s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f --depth=1 origin refs/heads/v2.3.4:refs/heads/v2.3.4
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' refs/heads/v2.3.4 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' refs/heads/v2.3.4 --
=== CONT  TestStat/gitrepo1/v2
=== NAME  TestStat/gitrepo1/v1.2.3
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
=== CONT  TestLatest/gitrepo1
=== NAME  TestReadZip/gitrepo1/v3/v3/sub
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' a8205f853c297ad2c3c502ba9a355b35b7dd3ca5 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' a8205f853c297ad2c3c502ba9a355b35b7dd3ca5 --
=== NAME  TestReadFile/gitrepo1/v2.3.4/another.txt
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git cat-file blob 76a00fb249b7f93091bc2c89a789dab1fc1bc26f:another.txt
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git cat-file blob 76a00fb249b7f93091bc2c89a789dab1fc1bc26f:another.txt
=== NAME  TestReadZip/gitrepo1/v3/v3/sub
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f --depth=1 origin refs/heads/v3:refs/heads/v3
2023/12/13 22:19:21 serving /git/gitrepo1/info/refs?service=git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
    git_test.go:166: 0.026s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f --depth=1 origin refs/heads/v3:refs/heads/v3
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' refs/heads/v3 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' refs/heads/v3 --
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ a8205f853c297ad2c3c502ba9a355b35b7dd3ca5 -- v3/sub
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ a8205f853c297ad2c3c502ba9a355b35b7dd3ca5 -- v3/sub
=== NAME  TestReadZip/gitrepo1/v2/
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' 9d02800338b8a55be062c838d1f02e0c5780b9eb --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' 9d02800338b8a55be062c838d1f02e0c5780b9eb --
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f --depth=1 origin refs/heads/v2:refs/heads/v2
2023/12/13 22:19:21 serving /git/gitrepo1/info/refs?service=git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
    git_test.go:166: 0.025s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f --depth=1 origin refs/heads/v2:refs/heads/v2
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' refs/heads/v2 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' refs/heads/v2 --
=== NAME  TestReadZip/gitrepo1/v3/
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ a8205f853c297ad2c3c502ba9a355b35b7dd3ca5
    git_test.go:166: 0.002s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ a8205f853c297ad2c3c502ba9a355b35b7dd3ca5
=== NAME  TestReadFile/gitrepo1/v2/another.txt
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git cat-file blob 9d02800338b8a55be062c838d1f02e0c5780b9eb:another.txt
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git cat-file blob 9d02800338b8a55be062c838d1f02e0c5780b9eb:another.txt
=== NAME  TestStat/gitrepo1/HEAD
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
=== NAME  TestReadFile/gitrepo1/latest/README
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f --depth=1 origin ede458df7cd0fdca520df19a33158086a8a68e81:refs/dummy
2023/12/13 22:19:21 serving /git/gitrepo1/info/refs?service=git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
    git_test.go:166: 0.024s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f --depth=1 origin ede458df7cd0fdca520df19a33158086a8a68e81:refs/dummy
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git cat-file blob ede458df7cd0fdca520df19a33158086a8a68e81:README
--- PASS: TestLatest (0.07s)
    --- PASS: TestLatest/gitrepo1 (0.09s)
=== NAME  TestReadFile/gitrepo1/latest/README
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git cat-file blob ede458df7cd0fdca520df19a33158086a8a68e81:README
--- PASS: TestReadFile (0.00s)
    --- PASS: TestReadFile/gitrepo1/v2.3.4/another.txt (0.12s)
    --- PASS: TestReadFile/gitrepo1/v2/another.txt (0.18s)
    --- PASS: TestReadFile/gitrepo1/latest/README (0.21s)
=== NAME  TestReadZip/gitrepo1/v3/v3/sub/dir
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ a8205f853c297ad2c3c502ba9a355b35b7dd3ca5 -- v3/sub/dir
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ a8205f853c297ad2c3c502ba9a355b35b7dd3ca5 -- v3/sub/dir
=== NAME  TestReadZip/gitrepo1/aaaaaaaaab/
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f origin 'refs/heads/*:refs/heads/*' 'refs/tags/*:refs/tags/*'
2023/12/13 22:19:21 serving /git/gitrepo1/info/refs?service=git-upload-pack
    git_test.go:166: 0.014s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch -f origin 'refs/heads/*:refs/heads/*' 'refs/tags/*:refs/tags/*'
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch --unshallow -f origin
2023/12/13 22:19:21 serving /git/gitrepo1/info/refs?service=git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
2023/12/13 22:19:21 serving /git/gitrepo1/git-upload-pack
    git_test.go:166: 0.026s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git fetch --unshallow -f origin
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' aaaaaaaaab --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' aaaaaaaaab --
=== NAME  TestStat/gitrepo1/97f6aa59
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' 97f6aa59 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' 97f6aa59 --
=== NAME  TestStat/gitrepo1/ede458df
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
=== NAME  TestStat/gitrepo1/v2.3
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' 76a00fb249b7f93091bc2c89a789dab1fc1bc26f --
    git_test.go:166: 0.002s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' 76a00fb249b7f93091bc2c89a789dab1fc1bc26f --
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.03s)
    --- PASS: TestStat/gitrepo1/v2.3.4 (0.03s)
    --- PASS: TestStat/gitrepo1/v1.2.3 (0.06s)
    --- PASS: TestStat/gitrepo1/v2 (0.06s)
    --- PASS: TestStat/gitrepo1/HEAD (0.18s)
    --- PASS: TestStat/gitrepo1/aaaaaaaaab (0.20s)
    --- PASS: TestStat/gitrepo1/97f6aa59 (0.20s)
    --- PASS: TestStat/gitrepo1/ede458df (0.20s)
    --- PASS: TestStat/gitrepo1/v2.3 (0.18s)
=== NAME  TestReadZip/gitrepo1/v2.3.4/
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ 76a00fb249b7f93091bc2c89a789dab1fc1bc26f
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ 76a00fb249b7f93091bc2c89a789dab1fc1bc26f
=== NAME  TestReadZip/gitrepo1/v2/
    git_test.go:166: cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ 9d02800338b8a55be062c838d1f02e0c5780b9eb
    git_test.go:166: 0.002s # cd /tmp/gitrepo-test-3061025134/modcache/cache/vcs/f15aca76b53a2add25cc82b91e472dec96e5771fae89e0fb441fe25f933bc3d2; git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ 9d02800338b8a55be062c838d1f02e0c5780b9eb
--- PASS: TestReadZip (0.00s)
    --- PASS: TestReadZip/gitrepo1/v3/v3/sub (0.15s)
    --- PASS: TestReadZip/gitrepo1/v3/ (0.18s)
    --- PASS: TestReadZip/gitrepo1/v3/v3/sub/dir (0.21s)
    --- PASS: TestReadZip/gitrepo1/aaaaaaaaab/ (0.25s)
    --- PASS: TestReadZip/gitrepo1/v2.3.4/ (0.26s)
    --- PASS: TestReadZip/gitrepo1/v2/ (0.26s)
FAIL
FAIL    cmd/go/internal/modfetch/codehost       0.272s
FAIL

@bcmills
Copy link
Contributor

bcmills commented Dec 14, 2023

This does not appear to be caused by a race with another test: TestStat/gitrepo1/v1.2.4-annotated on its own seems to reproduce it readily enough.

root@buildlet-linux-amd64-bullseye-rnb4ea69f:/workdir/go/src# while ../bin/go test cmd/go/internal/modfetch/codehost -count=1 -run='TestStat/gitrepo1/v1.2.4-annotated' -v ; do true ; done
vcs-test.golang.org rerouted to http://127.0.0.1:40115
https://vcs-test.golang.org rerouted to https://127.0.0.1:36511
=== RUN   TestStat
=== PAUSE TestStat
=== CONT  TestStat
=== RUN   TestStat/gitrepo1/v1.2.4-annotated
=== PAUSE TestStat/gitrepo1/v1.2.4-annotated
=== CONT  TestStat/gitrepo1/v1.2.4-annotated
    git_test.go:166: mkdir -p /tmp/gitrepo-test-2798926700/modcache/cache/vcs # git3 http://127.0.0.1:40115/git/gitrepo1
    git_test.go:166: # lock /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163.lock
    git_test.go:166: mkdir -p /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163 # git3 http://127.0.0.1:40115/git/gitrepo1
    git_test.go:166: cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git init --bare
    git_test.go:166: 0.003s # cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git init --bare
    git_test.go:166: cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git remote add origin -- http://127.0.0.1:40115/git/gitrepo1
    git_test.go:166: 0.002s # cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git remote add origin -- http://127.0.0.1:40115/git/gitrepo1
    git_test.go:166: cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git tag -l
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git tag -l
    git_test.go:166: cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git ls-remote -q origin
2023/12/14 16:06:32 serving /git/gitrepo1/info/refs?service=git-upload-pack
2023/12/14 16:06:32 gitrepo1.txt:
> handle git
> env GIT_AUTHOR_NAME='Russ Cox'
> env GIT_AUTHOR_EMAIL='rsc@golang.org'
> env GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
> env GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
> git init
[stdout]
Initialized empty Git repository in /tmp/vcstest419472164/git/gitrepo1/.git/
> at 2018-04-17T15:43:22-04:00
> unquote ''
> cp stdout README
> git add README
> git commit -a -m 'empty README'
[stdout]
[main (root-commit) ede458d] empty README
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 README
> git branch -m master
> git tag v1.2.3
> at 2018-04-17T15:45:48-04:00
> git branch v2
> git checkout v2
[stderr]
Switched to branch 'v2'
> echo 'v2'
[stdout]
v2
> cp stdout v2
> git add v2
> git commit -a -m 'v2'
[stdout]
[v2 76a00fb] v2
 1 file changed, 1 insertion(+)
 create mode 100644 v2
> git tag v2.3
> git tag v2.0.1
> git branch v2.3.4
> at 2018-04-17T16:00:19-04:00
> echo 'intermediate'
[stdout]
intermediate
> cp stdout foo.txt
> git add foo.txt
> git commit -a -m 'intermediate'
[stdout]
[v2 97f6aa5] intermediate
 1 file changed, 1 insertion(+)
 create mode 100644 foo.txt
> at 2018-04-17T16:00:32-04:00
> echo 'another'
[stdout]
another
> cp stdout another.txt
> git add another.txt
> git commit -a -m 'another'
[stdout]
[v2 9d02800] another
 1 file changed, 1 insertion(+)
 create mode 100644 another.txt
> git tag v2.0.2
> at 2018-04-17T16:16:52-04:00
> git checkout master
[stderr]
Switched to branch 'master'
> git branch v3
> git checkout v3
[stderr]
Switched to branch 'v3'
> mkdir v3/sub/dir
> echo 'v3/sub/dir/file'
[stdout]
v3/sub/dir/file
> cp stdout v3/sub/dir/file.txt
> git add v3
> git commit -a -m 'add v3/sub/dir/file.txt'
[stdout]
[v3 a8205f8] add v3/sub/dir/file.txt
 1 file changed, 1 insertion(+)
 create mode 100644 v3/sub/dir/file.txt
> at 2018-04-17T22:23:00-04:00
> git checkout master
[stderr]
Switched to branch 'master'
> git tag -a v1.2.4-annotated -m 'v1.2.4-annotated'
> git show-ref --tags --heads
[stdout]
ede458df7cd0fdca520df19a33158086a8a68e81 refs/heads/master
9d02800338b8a55be062c838d1f02e0c5780b9eb refs/heads/v2
76a00fb249b7f93091bc2c89a789dab1fc1bc26f refs/heads/v2.3.4
a8205f853c297ad2c3c502ba9a355b35b7dd3ca5 refs/heads/v3
ede458df7cd0fdca520df19a33158086a8a68e81 refs/tags/v1.2.3
b004e48a345a86ed7a2fb7debfa7e0b2f9b0dd91 refs/tags/v1.2.4-annotated
76a00fb249b7f93091bc2c89a789dab1fc1bc26f refs/tags/v2.0.1
9d02800338b8a55be062c838d1f02e0c5780b9eb refs/tags/v2.0.2
76a00fb249b7f93091bc2c89a789dab1fc1bc26f refs/tags/v2.3
> cmp stdout .git-refs

    git_test.go:166: 0.062s # cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git ls-remote -q origin
    git_test.go:166: cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
    git_test.go:166: 0.001s # cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' ede458df7cd0fdca520df19a33158086a8a68e81 --
    git_test.go:166: cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git fetch -f --depth=1 origin refs/tags/v1.2.4-annotated:refs/tags/v1.2.4-annotated
2023/12/14 16:06:32 serving /git/gitrepo1/info/refs?service=git-upload-pack
2023/12/14 16:06:32 serving /git/gitrepo1/git-upload-pack
2023/12/14 16:06:32 serving /git/gitrepo1/git-upload-pack
    git_test.go:166: 0.029s # cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git fetch -f --depth=1 origin refs/tags/v1.2.4-annotated:refs/tags/v1.2.4-annotated
    git_test.go:166: cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' refs/tags/v1.2.4-annotated --
    git_test.go:166: 0.002s # cd /tmp/gitrepo-test-2798926700/modcache/cache/vcs/199176056088af8bf42769b8040be22adc4a66be01019614455cdedaa65a2163; git -c log.showsignature=false log --no-decorate -n1 '--format=format:%H %ct %D' refs/tags/v1.2.4-annotated --
    git_test.go:661: Stat: incorrect info
        have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
        want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.10s)
FAIL
FAIL    cmd/go/internal/modfetch/codehost       0.110s

@bcmills
Copy link
Contributor

bcmills commented Dec 14, 2023

The failing builder has git version 2.30.2. My workstation has git version 2.43.0.472.g3155946c3a-goog. I'm checking the Git release notes for clues as to the root cause and potential workarounds.

@bcmills
Copy link
Contributor

bcmills commented Dec 14, 2023

No luck in the release notes. Running git bisect on Git itself to narrow it down.

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- ((pkg == "cmd/go/internal/modfetch/codehost" && test == "TestStat") || pkg == "lock") && `incorrect info` && `Tags:\[v1.2.4-annotated\]`
2023-12-15 19:35 linux-riscv64-jsing go@b60bf8f8 cmd/go/internal/modfetch/codehost.TestStat (log)
vcs-test.golang.org rerouted to http://127.0.0.1:46463
https://vcs-test.golang.org rerouted to https://127.0.0.1:39483
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.50s)
        git_test.go:661: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
    --- FAIL: TestStat/gitrepo1/HEAD (4.34s)
        git_test.go:661: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
fatal: the remote end hung up unexpectedly

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- ((pkg == "cmd/go/internal/modfetch/codehost" && test == "TestStat") || pkg == "lock") && `incorrect info` && `Tags:\[v1.2.4-annotated\]`
2023-12-18 23:35 darwin-amd64-11_0 go@5b84d500 cmd/go/internal/modfetch/codehost.TestStat (log)
vcs-test.golang.org rerouted to http://127.0.0.1:53902
https://vcs-test.golang.org rerouted to https://127.0.0.1:53903
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.98s)
        git_test.go:661: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
    --- FAIL: TestStat/gitrepo1/ede458df (0.35s)
        git_test.go:661: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
    --- FAIL: TestStat/gitrepo1/HEAD (1.13s)
        git_test.go:661: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
fatal: the remote end hung up unexpectedly

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- ((pkg == "cmd/go/internal/modfetch/codehost" && test == "TestStat") || pkg == "lock") && `incorrect info` && `Tags:\[v1.2.4-annotated\]`
2024-01-08 18:26 darwin-amd64-11_0 go@75984918 cmd/go/internal/modfetch/codehost.TestStat (log)
vcs-test.golang.org rerouted to http://127.0.0.1:54136
https://vcs-test.golang.org rerouted to https://127.0.0.1:54137
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (0.71s)
        git_test.go:661: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}

watchflakes

@bcmills
Copy link
Contributor

bcmills commented Jan 11, 2024

This reproduces on the darwin-amd64-11 builder if I run TestStat/gitrepo1/v1.2.4-annotated in isolation:

gopher@Gophers-iMac-Pro-2 src % go test cmd/go/internal/modfetch/codehost -run=TestStat/gitrepo1/v1.2.4-annotated
vcs-test.golang.org rerouted to http://127.0.0.1:49785
https://vcs-test.golang.org rerouted to https://127.0.0.1:49786
fatal: the remote end hung up unexpectedly
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (1.82s)
        git_test.go:661: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
FAIL
FAIL    cmd/go/internal/modfetch/codehost       1.878s
FAIL
gopher@Gophers-iMac-Pro-2 src % git --version
git version 2.24.3 (Apple Git-128)

@bcmills
Copy link
Contributor

bcmills commented Jan 11, 2024

Bisecting git between 2.24.3 and 2.30.2 to figure out where this next git bug was for clues about how to work around it.

@bcmills
Copy link
Contributor

bcmills commented Jan 11, 2024

Bisected the fix to git/git@eb04975:

commit eb049759fb6b739310af52ee0e13ce6cd0c86be7
Author: Jeff King <peff@peff.net>
Date:   Fri Sep 25 14:34:36 2020 -0400

    protocol: re-enable v2 protocol by default

    Protocol v2 became the default in v2.26.0 via 684ceae32d (fetch: default
    to protocol version 2, 2019-12-23). More widespread use turned up a
    regression in negotiation. That was fixed in v2.27.0 via 4fa3f00abb
    (fetch-pack: in protocol v2, in_vain only after ACK, 2020-04-27), but we
    also reverted the default to v0 as a precuation in 11c7f2a30b (Revert
    "fetch: default to protocol version 2", 2020-04-22).

    In v2.28.0, we re-enabled it for experimental users with 3697caf4b9
    (config: let feature.experimental imply protocol.version=2, 2020-05-20)
    and haven't heard any complaints. v2.28 has only been out for 2 months,
    but I'd generally expect people turning on feature.experimental to also
    stay pretty up-to-date. So we're not likely to collect much more data by
    waiting. In addition, we have no further reports from people running
    v2.26.0, and of course some people have been setting protocol.version
    manually for ages.

    Let's move forward with v2 as the default again. It's possible there are
    still lurking bugs, but we won't know until it gets more widespread use.
    And we can find and squash them just like any other bug at this point.

    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

 Documentation/config/feature.txt  | 4 ----
 Documentation/config/protocol.txt | 3 +--
 protocol.c                        | 6 +-----
 3 files changed, 2 insertions(+), 11 deletions(-)

That commit was first released in Git 2.29.0.

@bcmills bcmills removed the FixPending Issues that have a fix which has not yet been reviewed or submitted. label Jan 16, 2024
@bcmills
Copy link
Contributor

bcmills commented Jan 16, 2024

Git protocol version 2 was introduced in Git 2.18, but the last time we updated the minimum supported Git version (in #26746 (comment)) we decided on 2.17.6.

I will try to find a workaround that fixes the test for Git 2.17.6.

@bcmills
Copy link
Contributor

bcmills commented Jan 16, 2024

...aaand 2.17.6 in particular passes the test. 😵‍💫

Back to bisecting, I guess. 😩

@bcmills
Copy link
Contributor

bcmills commented Jan 16, 2024

61c7711cfea250e7ed06839c07189df47fb42de7 is the first bad commit
commit 61c7711cfea250e7ed06839c07189df47fb42de7
Author: Jeff King <peff@peff.net>
Date:   Mon Nov 12 09:54:42 2018 -0500

    sha1-file: use loose object cache for quick existence check

    In cases where we expect to ask has_sha1_file() about a lot of objects
    that we are not likely to have (e.g., during fetch negotiation), we
    already use OBJECT_INFO_QUICK to sacrifice accuracy (due to racing with
    a simultaneous write or repack) for speed (we avoid re-scanning the pack
    directory).

    However, even checking for loose objects can be expensive, as we will
    stat() each one. On many systems this cost isn't too noticeable, but
    stat() can be particularly slow on some operating systems, or due to
    network filesystems.

    Since the QUICK flag already tells us that we're OK with a slightly
    stale answer, we can use that as a cue to look in our in-memory cache of
    each object directory. That basically trades an in-memory binary search
    for a stat() call.

    Note that it is possible for this to actually be _slower_. We'll do a
    full readdir() to fill the cache, so if you have a very large number of
    loose objects and a very small number of lookups, that readdir() may end
    up more expensive.

    This shouldn't be a big deal in practice. If you have a large number of
    reachable loose objects, you'll already run into performance problems
    (which you should remedy by repacking). You may have unreachable objects
    which wouldn't otherwise impact performance. Usually these would go away
    with the prune step of "git gc", but they may be held for up to 2 weeks
    in the default configuration.

    So it comes down to how many such objects you might reasonably expect to
    have, how much slower is readdir() on N entries versus M stat() calls
    (and here we really care about the syscall backing readdir(), like
    getdents() on Linux, but I'll just call this readdir() below).

    If N is much smaller than M (a typical packed repo), we know this is a
    big win (few readdirs() followed by many uses of the resulting cache).
    When N and M are similar in size, it's also a win. We care about the
    latency of making a syscall, and readdir() should be giving us many
    values in a single call. How many?

    On Linux, running "strace -e getdents ls" shows a 32k buffer getting 512
    entries per call (which is 64 bytes per entry; the name itself is 38
    bytes, plus there are some other fields). So we can imagine that this is
    always a win as long as the number of loose objects in the repository is
    a factor of 500 less than the number of lookups you make. It's hard to
    auto-tune this because we don't generally know up front how many lookups
    we're going to do. But it's unlikely for this to perform significantly
    worse.

    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

 object-store.h |  1 +
 sha1-file.c    | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

(git/git@61c7711, released in Git 2.21)

@bcmills
Copy link
Contributor

bcmills commented Jan 17, 2024

I checked by running git config --global protocol.version 1, and the bug in protocol version 1 is still present as of Git 2.43.0. (I've filed a bug with Google's Git maintainers, tracked in b/320678525 for those with access.)

Adding -c protocol.version=2 to the git fetch command seems to work around the bug.

  • In Git 2.17 it is ignored and has no effect.
  • In Git 2.18–2.26 it exposes us to the git fetch-pack bug that was fixed by git/git@4fa3f00abb, but that bug at least doesn't appear to cause any test failures.
  • In Git 2.21 and onward it mitigates the bug that was introduced in git/git@61c7711, which does cause test failures (namely, the ones reported in this issue).
  • In Git 2.29 and after it forces the behavior that is already the default.

@bcmills bcmills added the FixPending Issues that have a fix which has not yet been reviewed or submitted. label Jan 17, 2024
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/556358 mentions this issue: cmd/go/internal/modfetch: set protocol.version=2 for shallow git fetches

@bcmills bcmills added GoCommand cmd/go release-blocker and removed Testing An issue that has been verified to require only test changes, not just a test failure. labels Jan 17, 2024
@bcmills
Copy link
Contributor

bcmills commented Jan 17, 2024

Marking as release-blocker because this is causing test flakes on the Go builders.

Since the root cause is a git bug, users who are affected can work around it by upgrading or patching their locally-installed Git.

@bcmills
Copy link
Contributor

bcmills commented Jan 24, 2024

The underlying git bug has a proposed fix here:
https://lore.kernel.org/git/20240124010056.GA2603087@coredump.intra.peff.net/

ezz-no pushed a commit to ezz-no/go-ezzno that referenced this issue Feb 18, 2024
…instead of after

gitRepo.statLocal reports tag and version information.
If we are statting a hash that corresponds to a tag, we need to add that tag
before calling statLocal so that it can be included in that information.

Fixes golang#53955.
Updates golang#56881.

Change-Id: I69a71428e6ed9096d4cb8ed1bb79531415ff06c1
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/547155
Auto-Submit: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
ezz-no pushed a commit to ezz-no/go-ezzno that referenced this issue Feb 18, 2024
This works around a bug in 'git http-backend' that was fixed in
Git 2.34.0,¹ and will hopefully allow the tests in
cmd/go/internal/modfetch/codehost to pass reliably using older
Git releases (I tested with 2.30.2).

¹git/git@ff6a37c

Fixes golang#56881.

Change-Id: Icd2e4d252d5f712685d146f34e11922dd0c41ff0
Reviewed-on: https://go-review.googlesource.com/c/go/+/549795
Reviewed-by: Michael Matloob <matloob@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
ezz-no pushed a commit to ezz-no/go-ezzno that referenced this issue Feb 18, 2024
In gitRepo.stat, we were checking ref != "" twice,
which confused me during casual reading because it made it seem like
the string could be empty when it actually never is.

For golang#56881.

Change-Id: Ib83303a149ea771399cb55fedd5dfa02ad411ff0
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/549855
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
ezz-no pushed a commit to ezz-no/go-ezzno that referenced this issue Feb 18, 2024
This works around an apparent bug in the Git HTTP backend, introduced
in Git 2.21, that causes responses for the version 1 protocol to
provide incomplete tags.

For Git commands older than 2.18, this configuration flag is ignored.
(Note that Git 2.29 and above already use protocol version 2 by
default.)

Fixes golang#56881.

Change-Id: I9b241cfb604e5f633ca6a5d799df6706246684a7
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/556358
Run-TryBot: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/585815 mentions this issue: [release-branch.go1.21] cmd/go/internal/modfetch/codehost: add new git tags before statLocal instead of after

gopherbot pushed a commit that referenced this issue May 16, 2024
…t tags before statLocal instead of after

gitRepo.statLocal reports tag and version information.
If we are statting a hash that corresponds to a tag, we need to add that tag
before calling statLocal so that it can be included in that information.

For #53955.
For #56881.
For #64586

Change-Id: I69a71428e6ed9096d4cb8ed1bb79531415ff06c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/547155
Auto-Submit: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
(cherry picked from commit 7b5a373)
Reviewed-on: https://go-review.googlesource.com/c/go/+/585815
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. GoCommand cmd/go modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
Status: Done
Archived in project
Development

No branches or pull requests

3 participants
@bcmills @gopherbot and others