fix: XRootDHelper.exists supports non posix filesystem (object store) #1348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Change the way
XRootDHelper
checks the existence of a URL to accommodate for object store, where listing a directory does not make sense.This was mentioned in an old issue: #809
Until
v6.7.0
,exists
would throw an exception, as described in the issue.From
v6.8.0
, this PR #1017 changed the behavior, andexists
would unduly returnFalse
This PR uses
stat
call instead of listing the directory (adding @chrisburr as origin author, as he probably had a reason to do it this way)A side effect is that
exists
also works for directories, while before it would return alwaysFalse
(this can easily be changed if it is an issue, these are the comments in the code).QC
docs/
) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).Not sure how you go about testing xroot, but this is the test file I used, against real world storages
Result with
v6.7.0
Results with
v6.8.0
With this PR