Page MenuHomeSoftware Heritage

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

Authored by vlorentz on Dec 6 2018, 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 Metadata indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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.Dec 7 2018, 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 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.Dec 7 2018, 1:50 PM
This revision was automatically updated to reflect the committed changes.