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

Re: [PATCH v2 2/2] connect, protocol: log negotiated protocol version

From
Josh Steadmon <steadmon@google.com>
Date
Aug 6, 2021, 21:15 UTC
Message-ID
<YQ2mjmwoRYO4jqaH@google.com>
In-Reply-To
<CAPig+cSqm5cUmAVG6f73oZ+mi9pBJrOg2va2a_Op4=wNFyHfZQ@mail.gmail.com>
On 2021.08.04 18:28, Eric Sunshine wrote:
Show 27 quoted lines
> On Wed, Aug 4, 2021 at 6:17 PM Josh Steadmon <steadmon@google.com> wrote:
> > It is useful for performance monitoring and debugging purposes to know
> > the wire protocol used for remote operations. This may differ from the
> > version set in local configuration due to differences in version and/or
> > configuration between the server and the client. Therefore, log the
> > negotiated wire protocol version via trace2, for both clients and
> > servers.
> >
> > Signed-off-by: Josh Steadmon <steadmon@google.com>
> > ---
> > diff --git a/t/t5705-session-id-in-capabilities.sh b/t/t5705-session-id-in-capabilities.sh
> > @@ -73,6 +74,17 @@ do
> > +       test_expect_success "client & server log negotiated version (v${PROTO})" '
> > +               test_when_finished "rm -rf local tr2-client-events tr2-server-events" &&
> > +               cp -r "$LOCAL_PRISTINE" local &&
> > +               GIT_TRACE2_EVENT="$(pwd)/tr2-client-events" \
> > +               git -c protocol.version=$PROTO -C local fetch \
> > +                       --upload-pack "GIT_TRACE2_EVENT=\"$(pwd)/tr2-server-events\" git-upload-pack" \
> > +                       origin &&
> > +               test "$(grep \"key\":\"negotiated-version\",\"value\":\"$PROTO\" tr2-client-events)" &&
> > +               test "$(grep \"key\":\"negotiated-version\",\"value\":\"$PROTO\" tr2-server-events)"
> > +       '
> >  done
> 
> What are these `test` commands actually testing? Did you mean `test
> -n`? Or, even better, just plain `grep` (not within a
> command-substitution)?

Yes, sorry about that, just plain grep is best here. This was due to a quick copy & paste modification, I should have spent a bit more time thinking about the test case.

Will be fixed in V3.
Previous: Eric SunshineNext: Ævar Arnfjörð Bjarmason
Message 10 of 16 in “connect, protocol: log negotiated protocol version”
  1. connect, protocol: log negotiated protocol versionJosh Steadmon, Aug 3, 2021
  2. Taylor BlauAug 3, 2021
  3. Josh SteadmonAug 4, 2021
  4. Junio C HamanoAug 4, 2021
  5. 0/2 log negotiated protocol version.Josh Steadmon, Aug 4, 2021
  6. 1/2 protocol: add protocol version formatting functionJosh Steadmon, Aug 4, 2021
  7. Ævar Arnfjörð BjarmasonAug 4, 2021
  8. 2/2 connect, protocol: log negotiated protocol versionJosh Steadmon, Aug 4, 2021
  9. Eric SunshineAug 4, 2021
  10. Josh SteadmonAug 6, 2021
  11. Ævar Arnfjörð BjarmasonAug 4, 2021
  12. Taylor BlauAug 5, 2021
  13. Ævar Arnfjörð BjarmasonAug 5, 2021
  14. Josh SteadmonAug 6, 2021
  15. connect, protocol: log negotiated protocol versionJosh Steadmon, Aug 10, 2021
  16. Taylor BlauAug 16, 2021

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.