Skip to content

Make package loaders write releases instead of revisions

The artifacts they load match the semantics of a Release, but we used Revisions so far because of technical details (we needed the 'metadata' field of Revision that Release lacks) that is no longer relevant (thanks to the metadata storage).

Packages that were loaded by previous versions of the package loader (as revs) will be converted to releases. In order to avoid fetching them from the origin, the loader will look for an existing extid pointing to a revision (like it used to), fetch that revision, extract some fields (directory id, author, date, ...) and build a new release using this information.

This commit is unfortunately very large because of all changes in tests, mostly just new hashes and renaming 'revision' to 'release' (and various abbreviations and capitalizations).

The only meaningful changes are in:

  • swh/loader/package/deposit/loader.py
  • swh/loader/package/tests/test_loader.py
  • swh/loader/package/loader.py

To keep this commit as short as possible, I did not yet change individual loaders to create releases: they still create revisions, but are converted by the base loader. The next commit will refactor them to remove this conversion layer. This is implemented in rev2rel. Note that rev2rel drops the committer/committer_date, which was always equal to the author/date anyway, except for the deposit and opam loaders.

Depends on !231 (closed), !233 (closed), !234 (closed), !236 (closed)


Migrated from D6616 (view on Phabricator)

Merge request reports