Page MenuHomeSoftware Heritage

loader: Fix SvnRepo parameters ordering
ClosedPublic

Authored by anlambert on Thu, May 7, 7:20 PM.

Details

Summary

Looks like a mistake was missed in recent refactoring.

This makes the loader fail at each run, see below:

swh-loader_1                    | [2020-05-07 16:44:07,468: INFO/ForkPoolWorker-1] Processing revisions [1-9984] for {'swh-origin': '/tmp/swh.loader.svn.b5nm4bz2-68', 'remote_url': 'file:///tmp/tmpsh501dsm/swh.loader.svn.1bdcplkq-68/tmpkxp1x5tu', 'local_url': b'svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/GTNetS/tmpkxp1x5tu', 'uuid': b'48e7efb5-ca39-0410-a469-dd3cf9ba447f'}
swh-loader_1                    | [2020-05-07 16:44:07,473: ERROR/ForkPoolWorker-1] [Errno 13] Permission denied: b'svn:'
swh-loader_1                    | Traceback (most recent call last):
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/loader.py", line 520, in fetch_data
swh-loader_1                    |     data = next(self.swh_revision_gen)
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/loader.py", line 426, in process_svn_revisions
swh-loader_1                    |     for rev, nextrev, commit, new_objects, root_directory in gen_revs:
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/svn.py", line 224, in swh_hash_data_per_revision
swh-loader_1                    |     objects = self.swhreplay.compute_objects(rev)
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/ra.py", line 456, in compute_objects
swh-loader_1                    |     self.replay(rev)
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/ra.py", line 438, in replay
swh-loader_1                    |     self.conn.replay(rev, rev + 1, self.editor)
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/ra.py", line 412, in open_root
swh-loader_1                    |     return DirEditor(self.directory, rootpath=self.rootpath)
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/ra.py", line 283, in __init__
swh-loader_1                    |     os.makedirs(rootpath, exist_ok=True)
swh-loader_1                    |   File "/usr/local/lib/python3.7/os.py", line 213, in makedirs
swh-loader_1                    |     makedirs(head, exist_ok=exist_ok)
swh-loader_1                    |   File "/usr/local/lib/python3.7/os.py", line 213, in makedirs
swh-loader_1                    |     makedirs(head, exist_ok=exist_ok)
swh-loader_1                    |   File "/usr/local/lib/python3.7/os.py", line 213, in makedirs
swh-loader_1                    |     makedirs(head, exist_ok=exist_ok)
swh-loader_1                    |   [Previous line repeated 4 more times]
swh-loader_1                    |   File "/usr/local/lib/python3.7/os.py", line 223, in makedirs
swh-loader_1                    |     mkdir(name, mode)
swh-loader_1                    | PermissionError: [Errno 13] Permission denied: b'svn:'

Diff Detail

Repository
rDLDSVN Subversion (SVN) loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert created this revision.Thu, May 7, 7:20 PM

Build is green

Patch application report for D3136 (id=11149)

Rebasing onto efe36bbfc2...

Current branch diff-target is up to date.
Changes applied before test
commit dd4e6c4f942c32eeacc33115ed3fd4abf9b388e4
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu May 7 19:16:50 2020 +0200

    loader: Fix SvnRepo parameters ordering

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

vlorentz accepted this revision.Thu, May 7, 7:47 PM
vlorentz added a subscriber: vlorentz.

Why didn't any test catch this?

This revision is now accepted and ready to land.Thu, May 7, 7:47 PM
This revision was automatically updated to reflect the committed changes.