Page MenuHomeSoftware Heritage

loader: Upgrade repository with old formats prior loading
ClosedPublic

Authored by anlambert on Feb 18 2022, 3:53 PM.

Details

Summary

The loader only supports the latest bzr format (2a) so try to
upgrade old repository formats to it prior the loading process.

I tested this change in the docker environment and it seems to
work, some upgrade can take some times though.

Related to T3945

Fixes SWH-LOADER-BZR-3

Diff Detail

Repository
rDLDBZR BZR loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7202 (id=26114)

Rebasing onto 551e32945f...

Current branch diff-target is up to date.
Changes applied before test
commit 0b21206a7e06496d2f1bc8a73b480a0e63d576cd
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Feb 18 15:50:06 2022 +0100

    loader: Upgrade repository with old formats prior loading
    
    The loader only supports the latest bzr format (2a) so try to
    upgrade old repository formats to it prior the loading process.
    
    Related to T3945

See https://jenkins.softwareheritage.org/job/DLDBZR/job/tests-on-diff/44/ for more details.

This revision is now accepted and ready to land.Feb 18 2022, 4:13 PM
swh/loader/bzr/loader.py
80–81

So this should be dropped, shouldn't it?

swh/loader/bzr/loader.py
80–81

right it is not used anymore

Remove no longer used RepositoryNeedsUpgrade exception

Build is green

Patch application report for D7202 (id=26121)

Rebasing onto 551e32945f...

Current branch diff-target is up to date.
Changes applied before test
commit 77fd211f4ded31d89fa994d0828291d8fe8cac6c
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Feb 18 15:50:06 2022 +0100

    loader: Upgrade repository with old formats prior loading
    
    The loader only supports the latest bzr format (2a) so try to
    upgrade old repository formats to it prior the loading process.
    
    Related to T3945

See https://jenkins.softwareheritage.org/job/DLDBZR/job/tests-on-diff/45/ for more details.

ardumont accepted this revision.
ardumont added a reviewer: Reviewers.
Alphare added a task: Restricted Maniphest Task.Feb 21 2022, 1:45 PM

Should this be folded with the patch in T3963#79379?

Should this be folded with the patch in T3963#79379?

I think that patch should be in a separate diff rebased on top of that one. If you are okay with the changes in that diff, can you accept it so I can land it ?

Oh, I didn't realize that my approval was needed.

Oh, I didn't realize that my approval was needed.

Well, it's not required per say. But since you are the main author on this,
we are more comfortable if you do valid our diffs (if they are ;)

Cheers,