Re: reftable & jgit compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 3, 2024 at 4:41 PM Patrick Steinhardt <ps@xxxxxx> wrote:
>
> On Wed, Apr 03, 2024 at 12:36:04PM +0200, Han-Wen Nienhuys wrote:
> > Thanks again for taking up this work.
> >
> > As I'm browsing over your patches (and realizing how much of the
> > arcana of the format I've forgotten), I hope that I did not make any
> > errors in implementing the spec (and/or that Shawn didn't deviate his
> > implementation from the spec). It would be extremely unfortunate if an
> > incompatibility between CGit and JGit were discovered after it is
> > released.
> >
> > So far I have always been able to read JGit reftables using the C / Go
> > code, but it would be good to systematically test this, ie. generate a
> >  bunch of tables using JGit and check that passing them through the C
> > code (read & write) leaves them unchanged. Or perhaps check in some
> > tables as golden reference data.
> >
> > Josh can probably connect you to the right folks to help with this on
> > the JGit side.
>
> 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?

Yes, but not many (eg. CGitIgnoreTest.java).

I think the easiest way to make this happen is if CGit would ship a
command to dump a raw reftable in a release soonish. Then JGit could
use that command to cross-check that a JGit-written reftable can be
read correctly by the CGit code.  By shipping just the dumper you
avoid having to wait for proper reftable support to land in git.

Probably the dumper should be extended to also support seeks, so you
can also exercise the indexing/searching code.

-- 
Han-Wen Nienhuys - hanwenn@xxxxxxxxx - http://www.xs4all.nl/~hanwen





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux