Normalize _add() methods of the ProvenanceStorage interface
make them all accept a Dict[Sha1Git, xxx] as argument, ie:
- remove support for Iterable[bytes] in revision_add, and
- replace Iterable[bytes] by Dict[Sha1Git, bytes] for location_add
Currently, the sha1 of location path in location_add() is not really used by any backend, so the computation of said hashed is a waste of resource, but it makes the API of this interface much more consistent which will be helpful for coming features (like kafka journal).
Related to #4616 (closed)
Migrated from D8656 (view on Phabricator)
Merge request reports
Activity
Build has FAILED
Patch application report for D8656 (id=31244)
Rebasing onto 6f4a193e...
Current branch diff-target is up to date.
Changes applied before test
commit d182fcdbc532f1769bec129b2e37c36a59d021de Author: David Douard <david.douard@sdfa3.org> Date: Fri Oct 7 14:51:09 2022 +0200 Normalize _add() methods of the ProvenanceStorage interface make them all accept a Dict[Sha1Git, xxx] as argument, ie: - remove support for Iterable[bytes] in revision_add, and - replace Iterable[bytes] by Dict[Sha1Git, bytes] for location_add Currently, the sha1 of location path in location_add() is not really used by any backend, so the computation of said hashed is a waste of resource, but it makes the API of this interface much more consistent which will be helpful for coming features (like kafka journal).
Link to build: https://jenkins.softwareheritage.org/job/DPROV/job/tests-on-diff/673/ See console output for more information: https://jenkins.softwareheritage.org/job/DPROV/job/tests-on-diff/673/console
Build has FAILED
Patch application report for D8656 (id=31249)
Rebasing onto 6f4a193e...
Current branch diff-target is up to date.
Changes applied before test
commit 6b539ecbe1673caf539e0636de76881a3f8ed171 Author: David Douard <david.douard@sdfa3.org> Date: Fri Oct 7 14:51:09 2022 +0200 Normalize _add() methods of the ProvenanceStorage interface make them all accept a Dict[Sha1Git, xxx] as argument, ie: - remove support for Iterable[bytes] in revision_add, and - replace Iterable[bytes] by Dict[Sha1Git, bytes] for location_add Currently, the sha1 of location path in location_add() is not really used by any backend, so the computation of said hashed is a waste of resource, but it makes the API of this interface much more consistent which will be helpful for coming features (like kafka journal).
Link to build: https://jenkins.softwareheritage.org/job/DPROV/job/tests-on-diff/676/ See console output for more information: https://jenkins.softwareheritage.org/job/DPROV/job/tests-on-diff/676/console
Build is green
Patch application report for D8656 (id=31249)
Rebasing onto 6f4a193e...
Current branch diff-target is up to date.
Changes applied before test
commit 6b539ecbe1673caf539e0636de76881a3f8ed171 Author: David Douard <david.douard@sdfa3.org> Date: Fri Oct 7 14:51:09 2022 +0200 Normalize _add() methods of the ProvenanceStorage interface make them all accept a Dict[Sha1Git, xxx] as argument, ie: - remove support for Iterable[bytes] in revision_add, and - replace Iterable[bytes] by Dict[Sha1Git, bytes] for location_add Currently, the sha1 of location path in location_add() is not really used by any backend, so the computation of said hashed is a waste of resource, but it makes the API of this interface much more consistent which will be helpful for coming features (like kafka journal).
See https://jenkins.softwareheritage.org/job/DPROV/job/tests-on-diff/679/ for more details.
4 4 # See top-level LICENSE file for more information 5 5 6 6 from datetime import datetime 7 import hashlib mentioned in merge request !153 (closed)
Build is green
Patch application report for D8656 (id=31270)
Rebasing onto 6f4a193e...
Current branch diff-target is up to date.
Changes applied before test
commit 2bd74fc7d97d40d7132a6530cd0078e3ffb8c614 Author: David Douard <david.douard@sdfa3.org> Date: Fri Oct 7 14:51:09 2022 +0200 Normalize _add() methods of the ProvenanceStorage interface make them all accept a Dict[Sha1Git, xxx] as argument, ie: - remove support for Iterable[bytes] in revision_add, and - replace Iterable[bytes] by Dict[Sha1Git, bytes] for location_add Currently, the sha1 of location path in location_add() is not really used by any backend, so the computation of said hashed is a waste of resource, but it makes the API of this interface much more consistent which will be helpful for coming features (like kafka journal).
See https://jenkins.softwareheritage.org/job/DPROV/job/tests-on-diff/681/ for more details.
Build is green
Patch application report for D8656 (id=31273)
Rebasing onto 6f4a193e...
Current branch diff-target is up to date.
Changes applied before test
commit 7e6a62c990b76ac63ee53be1f4c1c147bba4b806 Author: David Douard <david.douard@sdfa3.org> Date: Tue Oct 11 16:30:46 2022 +0200 Rename ProvenanceInterface.directory_xxx_flattenned as directory_xxx_flattened and fix all occurrences of the typo. commit 2bd74fc7d97d40d7132a6530cd0078e3ffb8c614 Author: David Douard <david.douard@sdfa3.org> Date: Fri Oct 7 14:51:09 2022 +0200 Normalize _add() methods of the ProvenanceStorage interface make them all accept a Dict[Sha1Git, xxx] as argument, ie: - remove support for Iterable[bytes] in revision_add, and - replace Iterable[bytes] by Dict[Sha1Git, bytes] for location_add Currently, the sha1 of location path in location_add() is not really used by any backend, so the computation of said hashed is a waste of resource, but it makes the API of this interface much more consistent which will be helpful for coming features (like kafka journal).
See https://jenkins.softwareheritage.org/job/DPROV/job/tests-on-diff/683/ for more details.