Page MenuHomeSoftware Heritage

FUSE: fs: rework archive/ visibility and content
ClosedPublic

Authored by haltode on Dec 7 2020, 5:06 PM.

Details

Summary

See details and discussion in T2771.

  • ls archive/ is now always an empty result
  • Merge the meta/ directory content into archive/

Diff Detail

Repository
rDFUSE FUSE virtual file system
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 D4676 (id=16590)

Rebasing onto 77a5bcd6d7...

Current branch diff-target is up to date.
Changes applied before test
commit 0524a3efd088665b8d504fd18748328bc88fff6c
Author: Thibault Allançon <haltode@gmail.com>
Date:   Mon Dec 7 17:02:13 2020 +0100

    fs: rework archive/ visibility and content
    
    See details and discussion in T2771.
    
    - ls archive/ is now always an empty result
    - Merge the meta/ directory content into archive/

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

zack requested changes to this revision.Dec 7 2020, 10:32 PM
zack added a subscriber: zack.
zack added inline comments.
docs/design.md
52–58

Drop "always considered empty", and also ", e.g.: snapshot objects with many branches".
The latter reads awkwardly, the former is unclear at this stage.

You can then add at the end something like: "note: the archive directory cannot be listed with ls, but entries in it can be accessed (e.g., using cat or cd)".

(In passing: the duplication of these snippets between the design doc and the docstrings is annoying, but I don't have a better solution to propose for now.)

swh/fuse/cache.py
65

aren't we gonna need this later on, e.g., to populate the forthcoming cache/ dir?
if yes, better to keep it around and just not using it for now
(if not it can go of course)

swh/fuse/fs/mountpoint.py
31–36

uniform this with the changes suggested above

50–71

please add a JSON_SUFFIX = ".json" constant/attribute somewhere and use it here to avoid repeating ".json" thrice

69

good riddance meta/ dir, so long and thanks for all the fish

77–78

minor: I think we've consistently used the archive/<SWHID>.json meta-syntax elsewhere, please do the same here

swh/fuse/tests/test_mountpoint.py
12

ah, revenants of old code reviews :-)

rather, something like: assert {"archive", "origin"} <= set(os.listdir(fuse_mntdir))

(which just checks that the entry you'd like to see are present; and it's also order-independent)

This revision now requires changes to proceed.Dec 7 2020, 10:32 PM
haltode marked 7 inline comments as done.

Fix all zack comments.

Build is green

Patch application report for D4676 (id=16598)

Rebasing onto 77a5bcd6d7...

Current branch diff-target is up to date.
Changes applied before test
commit 7186852c902f769c3cba2d1abf09084855139774
Author: Thibault Allançon <haltode@gmail.com>
Date:   Mon Dec 7 17:02:13 2020 +0100

    fs: rework archive/ visibility and content
    
    See details and discussion in T2771.
    
    - ls archive/ is now always an empty result
    - Merge the meta/ directory content into archive/

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

This revision is now accepted and ready to land.Dec 8 2020, 9:37 AM