Page MenuHomeSoftware Heritage

Add content_fossology_license_{get,add} to the mem idx storage.
ClosedPublic

Authored by vlorentz on Thu, Dec 6, 3:35 PM.

Details

Summary

Also generalize the ctags merging code to work with licenses as well.

(Includes commits from D783)

Diff Detail

Repository
rDCIDX Object indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz created this revision.Thu, Dec 6, 3:35 PM
vlorentz updated this revision to Diff 2476.Thu, Dec 6, 3:40 PM
  • fix push
ardumont requested changes to this revision.Fri, Dec 7, 12:23 PM
ardumont added a subscriber: ardumont.

Can you please try and remove the merge bevavior?
A simple add policy should be enough.

Other than that, that's fine.

swh/indexer/storage/in_memory.py
100 ↗(On Diff #2476)

That's not supposed to be merge.
As i mention early in our discussion [1]

Another point to what i said earlier is that there is no merge scenario in the indexer storage tests.
Knowing me, i would have added it if i initially added this behavior it.

[1] D783#inline-4276

104 ↗(On Diff #2476)

My point is, if you add a simple add scenario here, everything should still be green.

235 ↗(On Diff #2476)

That's actually the other way around as you mentioned in T1443.

This revision now requires changes to proceed.Fri, Dec 7, 12:23 PM

Can you please try and remove the merge bevavior?
A simple add policy should be enough.

No it's not, eg. in test_content_ctags_add__add_new_ctags_added

ardumont accepted this revision.Fri, Dec 7, 1:50 PM
ardumont added inline comments.
swh/indexer/storage/in_memory.py
104 ↗(On Diff #2476)

Ok, so everything is fine in the end.
It's also an implementation detail of the in-memory storage this time.
Moving along ;)

235 ↗(On Diff #2476)

fixed in another diff.

This revision is now accepted and ready to land.Fri, Dec 7, 1:50 PM
vlorentz updated this revision to Diff 2493.Fri, Dec 7, 1:59 PM
  • Rebase
This revision was automatically updated to reflect the committed changes.