Backward compatibility is preserved.
Details
- Reviewers
anlambert - Group Reviewers
Reviewers - Commits
- rDSTOCe59eb389846f: Make Storage.origin_get support a list of origins, like other Storage.*_get…
R65:e59eb389846f: Make Storage.origin_get support a list of origins, like other Storage.*_get…
rDSTOe59eb389846f: Make Storage.origin_get support a list of origins, like other Storage.*_get…
Diff Detail
- Repository
- rDSTO Storage manager
- Branch
- origin_get-uniformity
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 4043 Build 5307: tox-on-jenkins Jenkins Build 5306: arc lint + arc unit
Event Timeline
Build is green
See https://jenkins.softwareheritage.org/job/DSTO/job/tox/177/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DSTO/job/tox/178/ for more details.
Apart a couple of nitpicks, looks good to me.
I think once this is landed, we should create a task to track the calls of origin_get using the old API in all swh modules and port them to the new one.
Once it is done, the return_single switches should be removed from the origin_get method implementation.
swh/storage/in_memory.py | ||
---|---|---|
782 | The method description should be updated to inform that multiple origins can be passed as parameter now. | |
813 | That else block could be removed by initializing return_single to False before the dict check | |
845 | I think that test can be removed, None will be returned with or without it | |
swh/storage/storage.py | ||
1085 | Method description needs update here too | |
1118 | same remark as above: else block could be removed | |
1145 | I know None is returned by default when return is not called but I think that expression is clearer return results[0] if results[0]['id'] is not None else None | |
1242 | origin_id seems a better variable name here | |
swh/storage/tests/test_storage.py | ||
1002 | s/id/origin_id/ |
swh/storage/in_memory.py | ||
---|---|---|
845 | Indeed, that was from an earlier iteration of my code. |
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tox/179/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tox/179/console