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

Re: reftable & jgit compatibility

From
Patrick Steinhardt <ps@pks.im>
Date
Apr 4, 2024, 06:29 UTC
Message-ID
<Zg5IrZIg-DOuf5nr@tanuki>
In-Reply-To
<20240403205451.GD1949464@coredump.intra.peff.net>
On Wed, Apr 03, 2024 at 04:54:51PM -0400, Jeff King wrote:
Show 14 quoted lines
> On Wed, Apr 03, 2024 at 12:47:15PM +0200, Patrick Steinhardt wrote:
> 
> > I very much agree, this thought has crossed my mind multiple times while
> > working on the whole reftable saga. Ideally, we would have integration
> > tests that write reftables with one of the implementations and then read
> > them with the respective other implementation. I wouldn't really know
> > where to put those though. CGit is very unlikely to pull in JGit as a
> > test dependency. Does JGit have any tests that already use CGit?
> 
> We do have some tests that use jgit to check bitmap interoperability.
> But obviously they're optional, and I suspect they are not run very
> often (I do have jgit in my path these days, so I run them, but I assume
> most people don't). It probably wouldn't be too hard to include it in
> one of the CI runs, though. You can grep for the JGIT prereq in t/.

Oh, that's great, I didn't know about that! I will take a look at updating our CI systems to include JGit...

Show 5 quoted lines
> We had another test that used jgit to check for some protocol
> interoperability. But it was broken with sha256 and nobody noticed. ;)
> There I replaced it with a hard-coded input. See 13e67aa39b (v0
> protocol: fix sha1/sha256 confusion for capabilities^{}, 2023-04-14) for
> some discussion.
... also to avoid rotting tests like this.
Show 6 quoted lines
> I think using actual jgit (versus a hard-coded input) is a good basic
> smoke test: it tells us if the two can interoperate generally. But for
> testing specific inputs like the case in 13e67aa39b, we are depending on
> jgit producing that specific behavior (which in this case, it probably
> wasn't any more). And there we are better off just with a manual test
> vector.

Agreed. I will add some basic interop tests that ensure that JGit and CGit can read their respective formats. I don't want it to be too fancy initially, but it's good to have a baseline which we can iterate from in the future.

Patrick
Previous: Jeff KingNext: Luca Milanesio
Message 9 of 11 in “reftable & jgit compatibility”
  1. Han-Wen NienhuysApr 3, 2024
  2. Patrick SteinhardtApr 3, 2024
  3. Han-Wen NienhuysApr 3, 2024
  4. Patrick SteinhardtApr 4, 2024
  5. Han-Wen NienhuysApr 4, 2024
  6. Patrick SteinhardtApr 4, 2024
  7. Han-Wen NienhuysApr 4, 2024
  8. Jeff KingApr 3, 2024
  9. Patrick SteinhardtApr 4, 2024
  10. Luca MilanesioApr 3, 2024
  11. Junio C HamanoApr 3, 2024

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.