Page MenuHomeSoftware Heritage

Guarantee the order of results for revision_get and release_get
ClosedPublic

Authored by olasd on Mar 5 2020, 3:55 PM.

Details

Summary

It's a bit silly, but we depend on it for some tests.

Test Plan

new tox tests added

Diff Detail

Repository
rDSTO Storage manager
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11002
Build 16563: tox-on-jenkinsJenkins
Build 16562: arc lint + arc unit

Event Timeline

vlorentz requested changes to this revision.Mar 6 2020, 1:16 AM
vlorentz added a subscriber: vlorentz.

wtf, did it all work thanks to an UB so far? And why aren't all the _missing completely broken then?

And we also want this for the other object types for consistency

This revision now requires changes to proceed.Mar 6 2020, 1:16 AM
olasd requested review of this revision.EditedMar 6 2020, 2:51 PM

wtf, did it all work thanks to an UB so far? And why aren't all the _missing completely broken then?

Because the _missing tests operate on sets (i.e. the caller doesn't care about the order, I think).

And we also want this for the other object types for consistency

Which other object types have a _get method that takes multiple objects?

In D2773#66477, @olasd wrote:

And we also want this for the other object types for consistency

Which other object types have a _get method that takes multiple objects?

Ping @vlorentz?

None, indeed. Sorry

swh/storage/tests/test_storage.py
958–959

You shouldn't need from_dict/to_dict

1220–1221

same

This revision is now accepted and ready to land.Mar 9 2020, 12:29 PM
This revision was landed with ongoing or failed builds.Mar 9 2020, 4:59 PM
This revision was automatically updated to reflect the committed changes.