fsspec / fsspec/gcsfs

refresh = True should be the default for GCSFS.ls

Open
#647 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
398
Forks
181
Avg merge
2d 10h
Merged PRs (30d)
36

Description

I was working with this system today, and noticed that ls wasn't returning all the files in a bucket. After I changed the call from:

 gcs_file_system.ls(my_bucket)

To

 gcs_file_system.ls(my_bucket, refresh=True)

I can appreciate the value of caching as an option, but returning an outdated file listing doesn't match the semantics of a filesystem ls, leading to user confusion.

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 by locating the GCSFS.ls entry point and tracing how its refresh argument controls cached listings. Check the existing listing-related tests, then make the default behavior return a current bucket listing while preserving an explicit cached option; done means the shown ls call includes newly available files without refresh=True.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.