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

Re: do people find t5504.8 flaky?

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 13, 2019, 03:47 UTC
Message-ID
<xmqqh838bfo3.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20191113010337.GA20023@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 41 quoted lines
> So really, what we want for this case is to just get the remote status,
> like so:
>
> diff --git a/send-pack.c b/send-pack.c
> index 34c77cbb1a..d4db965b96 100644
> --- a/send-pack.c
> +++ b/send-pack.c
> @@ -565,19 +565,19 @@ int send_pack(struct send_pack_args *args,
>  
>  	if (need_pack_data && cmds_sent) {
>  		if (pack_objects(out, remote_refs, extra_have, args) < 0) {
> -			for (ref = remote_refs; ref; ref = ref->next)
> -				ref->status = REF_STATUS_NONE;
>  			if (args->stateless_rpc)
>  				close(out);
>  			if (git_connection_is_socket(conn))
>  				shutdown(fd[0], SHUT_WR);
>  
>  			/*
>  			 * Do not even bother with the return value; we know we
> -			 * are failing, and just want the error() side effects.
> +			 * are failing, and just want the error() side effects,
> +			 * as well as marking refs with the remote status (if
> +			 * we get one).
>  			 */
>  			if (status_report)
> -				receive_unpack_status(&reader);
> +				receive_status(&reader, remote_refs);
>  
>  			if (use_sideband) {
>  				close(demux.out);
>
> I was worried at first that we might make things worse for the case that
> the network has hung up completely (which would cause pack-objects to
> fail, but also cause us to not get anything from the remote). But this
> is really no worse. Even in the existing code, we'd complain to stderr
> about trying to read the unpack status. And then when we read the remote
> ref status, as soon as we see a bad packet we just quietly stop reading
> (thus leaving any unmentioned refs as EXPECTING_REPORT).
>
> So with that second patch above, the test failure goes away for me.
Nicely analyzed and patched.
Previous: Randall S. BeckerNext: Johannes Schindelin
Message 8 of 9 in “do people find t5504.8 flaky?”
  1. Junio C HamanoApr 23, 2019
  2. Jeff KingApr 23, 2019
  3. SZEDER GáborNov 13, 2019
  4. Jeff KingNov 13, 2019
  5. Jeff KingNov 13, 2019
  6. SZEDER GáborNov 18, 2019
  7. Randall S. BeckerNov 18, 2019
  8. Junio C HamanoNov 13, 2019
  9. Johannes SchindelinApr 29, 2019

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.