Page MenuHomeSoftware Heritage

loader: Fix if condition in SvnLoaderFromRemoteDump.dump_revisions
ClosedPublic

Authored by anlambert on Jan 26 2022, 3:51 PM.

Details

Summary

An error was raised when the last dumped subversion revision was
equal to the last one loaded into the archive.

[2022-01-25 19:46:20,607: ERROR/ForkPoolWorker-23] Loading failure, updating to `failed` status
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/swh/loader/core/loader.py", line 335, in load
    self.prepare()
  File "/usr/lib/python3/dist-packages/swh/loader/svn/loader.py", line 811, in prepare
    dump_path = self.dump_svn_revisions(self.svn_url, last_loaded_svn_rev)
  File "/usr/lib/python3/dist-packages/swh/loader/svn/loader.py", line 771, in dump_svn_revisions
    % (last_dumped_rev, last_loaded_svn_rev)
Exception: Last dumped subversion revision (8557) is lesser than the last one loaded into the archive (8557).

Depends on D7042

Diff Detail

Repository
rDLDSVN Subversion (SVN) loader
Branch
dump-loader-fix-compare-revisions
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26363
Build 41219: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 41218: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D7043 (id=25531)

Could not rebase; Attempt merge onto afdee6dbee...

Updating afdee6d..da1a81b
Fast-forward
 swh/loader/svn/loader.py            |  2 +-
 swh/loader/svn/replay.py            |  2 +-
 swh/loader/svn/svn.py               | 27 +++++++++++++++++++--------
 swh/loader/svn/tests/test_loader.py | 22 ++++++++++++++++++----
 4 files changed, 39 insertions(+), 14 deletions(-)
Changes applied before test
commit da1a81bbdb01f390ebaafa8de4fc3b4c76fb32df
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Jan 26 15:47:53 2022 +0100

    loader: Fix if condition in SvnLoaderFromRemoteDump.dump_revisions
    
    An error was raised when the last dumped subversion revision was
    equal to the last one loaded into the archive.

commit 2bbbd6f99f9cd64718bac40a7e78a04c3026c6c3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Jan 26 15:33:17 2022 +0100

    replay: Fix links restoration in DirEditor.remove_external_path
    
    The restoration of this type of file was not correctly handled
    in the remove_external_path method of the DirEditor class.

commit 34f61cb58157e0cf4a70810a6ef66364b3c2b24e
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Jan 26 15:28:54 2022 +0100

    svn: Ignore externals parsing related errors when exporting
    
    Those are not critical for a successfull loading of repositories with
    malformed external definitions so we can safely ignore them.
    
    Related to T3875

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

This revision is now accepted and ready to land.Jan 26 2022, 4:21 PM