Page MenuHomeSoftware Heritage

from_disk.Content: Add missing path info for symlink
ClosedPublic

Authored by anlambert on Dec 5 2022, 4:19 PM.

Details

Summary

from_disk.Content object created for a symlink was missing path info
so ensure to add it for consistency with from_disk.Content object
created for a regular file.

Diff Detail

Repository
rDMOD Data model
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 D8920 (id=32133)

Rebasing onto fe8d55588a...

Current branch diff-target is up to date.
Changes applied before test
commit 818ad826a4f4db6d7e6c17877ee2ca4c4447e6f8
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Dec 5 16:15:55 2022 +0100

    from_disk.Content: Add missing path info for symlink
    
    from_disk.Content object created for a symlink was missing path info
    so ensure to add it for consistency with from_disk.Content object
    created for a regular file.

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

Does it mean we were silently dropping data until this? Which loaders use this?

Does it mean we were silently dropping data until this? Which loaders use this?

Only for the symlink case, found the issue while debugging subversion loader (see line that triggered error).
Loaders convert from_disk merkle nodes to model objects before sending data to the storage so that's why we did not spot it before.

ah, so it doesn't matter for other loaders. Phew!

This revision is now accepted and ready to land.Dec 6 2022, 1:36 PM