Page MenuHomeSoftware Heritage

maven: Don't carry deleted versions over to the next snapshot
ClosedPublic

Authored by vlorentz on Dec 7 2021, 1:44 PM.

Details

Summary

Snapshots should only record versions that currently exist;
even if they used to exist in a previous visits.

If readers of the archive want to access deleted versions,
than can look up older snapshots.

@borisbaldassari Sounds good? Am I missing something about the way Maven works?

Diff Detail

Repository
rDLDBASE Generic VCS/Package 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 D6769 (id=24563)

Could not rebase; Attempt merge onto 79b1075e1d...

Updating 79b1075..a96389f
Fast-forward
 requirements.txt                   |   1 +
 swh/loader/package/maven/loader.py | 112 ++++++++++++++-----------------------
 2 files changed, 44 insertions(+), 69 deletions(-)
Changes applied before test
commit a96389f5b916b307141aaceac6f8a49e43ca389b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Dec 7 13:43:08 2021 +0100

    maven: Don't carry deleted versions over to the next snapshot
    
    Snapshots should only record versions that currently exist;
    even if they used to exist in a previous visits.
    
    If readers of the archive want to access deleted versions,
    than can look up older snapshots.

commit e8b6ed5ab223de3839a3c02d771364207d47160a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Dec 7 13:37:17 2021 +0100

    maven: Make MavenPackageInfo.from_metadata more concise

commit 5da115b6e5bf48e3829c830c9f164bd07ed14509
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Dec 7 13:34:29 2021 +0100

    maven: Simplify definition of the 'version_artifact' dict
    
    We don't need it to be ordered; and '.keys()' is redundant.

commit ccf71383c61d642f717256a5ed55539073fd0477
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Dec 7 13:32:26 2021 +0100

    maven: Simplify build_extrinsic_directory_metadata.

commit a76ab28824a2c203b8cc5f9ff70cecf922770662
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Dec 7 11:54:33 2021 +0100

    maven: Add typing to the artifacts dict

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

Definitely agree that artefacts deleted on the server should return an empty snapshot.

This revision is now accepted and ready to land.Dec 7 2021, 5:08 PM