Skip to content
Snippets Groups Projects

Remove endpoint object_find_by_sha1_git

Open vlorentz requested to merge object_find_by_sha1_git into master
1 unresolved thread

It is not used since swh-loader-git@6605ee3f

Merge request reports

Pipeline #7877 passed

Pipeline passed for e3f4d309 on object_find_by_sha1_git

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1681 1681 # misc.
1682 1682 ##########################
1683 1683
1684 def object_find_by_sha1_git(self, ids: List[Sha1Git]) -> Dict[Sha1Git, List[Dict]]:
1685 results: Dict[Sha1Git, List[Dict]] = {id_: [] for id_ in ids}
1686 missing_ids = set(ids)
1687
1688 # Mind the order, revision is the most likely one for a given ID,
1689 # so we check revisions first.
1690 queries: List[Tuple[str, Callable[[List[Sha1Git]], Iterable[Sha1Git]]]] = [
1691 ("revision", self._cql_runner.revision_missing),
1692 ("release", self._cql_runner.release_missing),
1693 ("content", self.content_missing_per_sha1_git),
  • I believe this method could go away too.

  • Author Maintainer

    It's still in use:

    ../swh-deposit/swh/deposit/api/common.py:                self.storage.content_missing_per_sha1_git([target_swhid.object_id])
    ../swh-graphql/swh/graphql/backends/archive.py:            ObjectType.CONTENT: self.storage.content_missing_per_sha1_git,
    ../swh-loader-core/swh/loader/tests/test_init.py:    not_found = list(swh_storage.content_missing_per_sha1_git([CONTENT.sha1_git]))
    ../swh-loader-core/swh/loader/tests/__init__.py:        not_found = list(storage.content_missing_per_sha1_git(cnts))
    ../swh-loader-git/swh/loader/git/loader.py:                    (self.storage.content_missing_per_sha1_git, TargetType.CONTENT),
    ../swh-scrubber/swh/scrubber/storage_checker.py:            self.storage.content_missing_per_sha1_git(list(cnt_references))
    ../swh-web/swh/web/utils/archive.py:            missing_hashes.append(storage.content_missing_per_sha1_git(obj_ids))
  • Please register or sign in to reply
  • David Douard approved this merge request

    approved this merge request

  • Please register or sign in to reply
    Loading