Hi,
We recently run into a issue, when a repo have the clone-depth=1 set, the fetch always fails.
And once we remove the clone-depth=1 from the manifest, the repo sync works again.
the section of the trace that errors out looks like this: (done with
GIT_TRACE_PACKET=1 GIT_CURL_VERBOSE=1
GIT_TRACE=1)
(upload-pack started)
.... many lines later ...
08:02:43.491860 run-command.c:341 trace: run_command: 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--thin' '--no-progress' '--depth=1' 'http://me@our_mirror/repoA/'
08:02:43.492192 exec_cmd.c:134 trace: exec: 'git' 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--thin' '--no-progress' '--depth=1' 'http://me@our_mirror/repoA/'
08:02:43.493788 git.c:349 trace: built-in: git 'fetch-pack' '--stateless-rpc' '--stdin' '--lock-pack' '--thin' '--no-progress' '--depth=1' 'http://me@our_mirror/repoA/'
08:02:43.493847 pkt-line.c:46 packet: fetch-pack< AAAAAAAA AAAAAAAA
08:02:43.493854 pkt-line.c:46 packet: fetch-pack< 0000
08:02:43.493861 pkt-line.c:46 packet: fetch-pack< BBBBBBBB HEAD\0 include-tag multi_ack_detailed multi_ack ofs-delta side-band side-band-64k thin-pack no-progress shallow no-done
... some hundred lines later, we saw the ref we want ...
08:02:43.483799 pkt-line.c:46 packet: git< AAAAAAAA refs/heads/this_is_the_branche
... and we have a lot of tags ...
08:02:43.503086 pkt-line.c:46 packet: fetch-pack< XXXXXXXX refs/tags/important_tag^{}
08:02:43.503090 pkt-line.c:46 packet: fetch-pack< YYYYYYYY refs/tags/best_tag
08:02:43.503094 pkt-line.c:46 packet: fetch-pack< ZZZZZZZZ refs/tags/awsome_tag^{}
08:02:43.503098 pkt-line.c:46 packet: fetch-pack< 0000
08:02:43.523158 pkt-line.c:46 packet: fetch-pack> 0000
08:02:43.523198 pkt-line.c:46 packet: git< 0000
error: no such remote ref AAAAAAAA
: git pack-refs --all --prune 1>| 2>|
error: Cannot fetch repoA
error: Exited sync due to fetch errors
Fetching project repoA
So, compared to the fetch from
partner-android.googlesource.com, our fetch does not attempt to "want" the AAAAAAA ref after it receives the ref list, and it simply ends the transaction and start throwing errors.
This is what was shown on the fetch from Google after it receives the ref list:
07:44:39.975529 pkt-line.c:46 packet: fetch-pack< AAAAAAAA refs/heads/this_is_the_branch
07:44:39.975556 pkt-line.c:46 packet: fetch-pack< ZZZZZZZZ refs/tags/my_only_tag ( they don't have much tags.. )
07:44:39.975566 pkt-line.c:46 packet: fetch-pack< 0000
07:44:39.978010 pkt-line.c:46 packet: fetch-pack> want AAAAAAAA multi_ack_detailed no-done side-band-64k thin-pack no-progress ofs-delta agent=git/2.1.3
07:44:39.978020 pkt-line.c:46 packet: fetch-pack> deepen 1
07:44:39.978024 pkt-line.c:46 packet: fetch-pack> 0000
07:44:39.978064 pkt-line.c:46 packet: git< 008bwant AAAAAAAA multi_ack_detailed no-done side-band-64k thin-pack no-progress ofs-delta agent=git/2.1.3000cdeepen 10000
07:44:39.978080 pkt-line.c:46 packet: fetch-pack> 0000
07:44:39.978093 pkt-line.c:46 packet: git< 0000
And once we removed the clone-depth=1, the fetch went back to normal again as now the fetch simply wants every ref after the ref list is received:
08:10:00.374716 pkt-line.c:46 packet: fetch-pack< YYYYYYYY refs/tags/second_to_last_tag
08:10:00.374721 pkt-line.c:46 packet: fetch-pack< ZZZZZZZZ refs/tags/the_last_tag^{}
08:10:00.374725 pkt-line.c:46 packet: fetch-pack< 0000
08:10:00.394606 pkt-line.c:46 packet: fetch-pack> want BBBBBBB multi_ack_detailed no-done side-band-64k thin-pack no-progress ofs-delta
08:10:00.394617 pkt-line.c:46 packet: fetch-pack> want AAAAAAA
... many many more lines later fetch finish without error
And the fetch is success and all is well.
It seems like somehow the clone-depth is causing issue on our server, but somehow working fine on google server? Have anyone seen this issue or have theory on what I should check?
Thanks a lot!