-
Notifications
You must be signed in to change notification settings - Fork 0
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
Avoid using glob() in Artifactory backend #132
Comments
Yes, I hope there is a good way to do so. Cause in the old implementation we were only returning the files in the folder, but since we decided that the concept of folders must not exist on a backend, we now return all files that have a backend path that starts with the requested sub-path. |
Ok, seems we should simply do: backend = audbackend.access(
'artifactory',
'https://audeering.jfrog.io/artifactory',
'data-public',
)
for p in backend._repo:
print(p) It returns all files in the repository and is really fast. |
Unfortunately, it seems the solution I proposed is not working with anonymous access at the moment. They might change it in the future, though: https://jfrog.atlassian.net/browse/RTFACT-7384 For the record, this is the commit where I replaced Under the hood it does the following: import audbackend
backend = audbackend.access(
'artifactory',
'https://audeering.jfrog.io/artifactory',
'data-public',
)
backend._use_legacy_file_structure()
query = [
'items.find',
{
'repo': {'$eq': 'data-public'},
'type': 'file',
},
'.include',
['name'],
]
backend._repo.aql(*query)
But returns 403 for an anonymous user (even if the repository allows anonymous access). |
As can be seen in audeering/audb@1e5a0cf the following works: backend = audbackend.access(
'artifactory',
'https://audeering.jfrog.io/artifactory',
'data-public',
)
for p in backend._repo.path:
print(p) |
It's not recursive. |
You can do this recursive by looping as long as it finds paths. But maybe that is as slow as |
It's also mentioned at devopshq/artifactory#423 that |
For the implementtion of
audbackend.Artifactory.ls()
we switched to useglob('*/**')
in thedev
branch, which is very slow. Inmain
we avoided usingglob()
inls()
, which we should also do indev
.The text was updated successfully, but these errors were encountered: