fsspec / fsspec/adlfs

Failure of `exists` when anonymous

Open
#290 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
211
Forks
120
PR merge metrics
No merged PRs in 30d

Description

If an instance is anonymous, it will raise an exception when doing exists on a path unless the path happens to be a publicly-available blob. If it is a directory (prefix) containing public blobs and can therefore be listed with ls, you will still get an exception rather than the expected True.

In this line, the call will cause HttpResponseError: ErrorCode:NoAuthenticationInformation for this case, so it should be wrapped in a try/except.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at adlfs/spec.py line 1397 and reproduce exists on an anonymous path that is a directory containing public blobs. Inspect the HttpResponseError raised for the unauthenticated listing call and verify that the directory case returns True as expected without affecting publicly available blobs.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.