Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • S swh-loader-git
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 28
    • Issues 28
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Platform
  • Development
  • swh-loader-git
  • Merge requests
  • !95

loader: Add support for submodules discovering

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Antoine Lambert requested to merge generated-differential-D7332-source into master Mar 10, 2022
  • Overview 9
  • Commits 1
  • Pipelines 0
  • Changes 3

The git loader can now discover submodules while loading a repository.

That process works the following way:

  1. Before sending a new directory to archive in the storage, check if it has a .gitmodules file in its entries and add the tuple (directory_id, content_sha1git) in a global set if it is the case.

  2. During the post_load operation, process each discovered .gitmodules file the following way:

  • retrieve content metadata to get sha1 checksum of file

  • retrieve .gitmodules content bytes in objstorage from sha1

  • parse .gitmodules file content

  • for each submodule definition:

    • get git commit id associated to submodule path

    • check if git commit has been archived by SWH

    • if not, add the submodule repository URL in a set

  • for each submodule detected as not archived or partially archived, create a one shot git loading task with high priority in the scheduler database

Related to #3311 Related to #3923


Migrated from D7332 (view on Phabricator)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: generated-differential-D7332-source