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

Re: reftable & jgit compatibility

From
Jeff King <peff@peff.net>
Date
Apr 3, 2024, 20:54 UTC
Message-ID
<20240403205451.GD1949464@coredump.intra.peff.net>
In-Reply-To
<Zg0zs2_QLpXv2PwT@tanuki>
On Wed, Apr 03, 2024 at 12:47:15PM +0200, Patrick Steinhardt wrote:
Show 6 quoted lines
> 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/.

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.

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.

-Peff
Previous: Han-Wen NienhuysNext: Patrick Steinhardt
Message 8 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.