Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHIA-1697: Add new flag to support recursively scanning and following links #18803

Merged
merged 7 commits into from
Nov 6, 2024

Conversation

emlowe
Copy link
Contributor

@emlowe emlowe commented Oct 31, 2024

Fixes #16268

Adds new harvester option follow_links that only works when used with recursive_scan and uses glob.glob instead of Path.rglob in order to follow links when scanning recursively for plots.

@emlowe emlowe added the Added Required label for PR that categorizes merge commit message as "Added" for changelog label Oct 31, 2024
@emlowe
Copy link
Contributor Author

emlowe commented Oct 31, 2024

It seems the hardlink test was skipped on all the OSs.

A little more research tells me hard links don't work for directories at all on any of the main OS (macos, linux, windows)

@emlowe emlowe changed the title Add new flag to support recurvely scanning and following links Add new flag to support recursively scanning and following links Oct 31, 2024
Copy link

coveralls-official bot commented Oct 31, 2024

Pull Request Test Coverage Report for Build 11632202557

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 37 of 37 (100.0%) changed or added relevant lines in 2 files are covered.
  • 31 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+0.03%) to 90.893%

Files with Coverage Reduction New Missed Lines %
chia/full_node/full_node_api.py 1 82.72%
chia/server/node_discovery.py 1 81.83%
chia/rpc/rpc_server.py 3 88.0%
chia/wallet/wallet_node.py 4 88.26%
chia/_tests/core/util/test_lockfile.py 22 77.31%
Totals Coverage Status
Change from base Build 11618130161: 0.03%
Covered Lines: 102788
Relevant Lines: 112866

💛 - Coveralls

@emlowe emlowe marked this pull request as ready for review November 1, 2024 15:52
@emlowe emlowe requested a review from a team as a code owner November 1, 2024 15:52
@emlowe emlowe changed the title Add new flag to support recursively scanning and following links CHIA-1697: Add new flag to support recursively scanning and following links Nov 1, 2024
Copy link
Contributor

@arvidn arvidn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good. However, the bug report you reference is talking about hard links, not symbolic links. I suppose it may be a bit tricker to test as not all filesystems may support them. But did you test this manually with hard links too?

@altendky
Copy link
Contributor

altendky commented Nov 6, 2024

I see the term hard-links there. But, is that much of a thing? I thought hard links didn't even show as being a link since they are just a regular whatever like the first whatever. They also presumably couldn't exist across volumes like are shown there? I know I'm extrapolating a bit here.

lrwxrwxrwx+ 1 root root 16 Sep 29 2021 plots01 -> /volume2/plots01
lrwxrwxrwx+ 1 root root 16 Sep 29 2021 plots02 -> /volume3/plots02
lrwxrwxrwx+ 1 root root 16 Sep 29 2021 plots03 -> /volume4/plots03

Do you know of a filesystem that supports directory hard links?

@arvidn
Copy link
Contributor

arvidn commented Nov 6, 2024

oh yeah, those do look like soft links

@pmaslana pmaslana merged commit 61cf266 into main Nov 6, 2024
362 checks passed
@pmaslana pmaslana deleted the EL.recursive-scan-symlinks branch November 6, 2024 17:24
@emlowe
Copy link
Contributor Author

emlowe commented Nov 6, 2024

Yea, I think the reporter was just incorrect but I didn't want to correct the report. My research indicates hard links to directories aren't something that any OS supports at least in the normal filesystems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added Required label for PR that categorizes merge commit message as "Added" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Recursive plot scan ignores hard links
4 participants