firehg opened a new issue, #38059:
URL: https://github.com/apache/beam/issues/38059

   The GCS filesystem's `List()` method in 
`go/pkg/beam/io/filesystem/gcs/gcs.go` uses `filepath.Match(object, obj.Name)` 
to filter listed objects. Since `filepath.Match` treats `*` as matching 
non-separator characters only (and `/` is the separator on Unix), patterns like 
`gs://bucket/*` and `gs://bucket/**` fail to match any GCS object whose name 
contains / — which is the vast majority of real-world GCS objects.
   The Java and Python SDKs handle this correctly: Java's `GcsUtil` supports 
`**` for recursive matching, and Python's `fnmatch` doesn't treat `/` as 
special.
   
   Reproduction: `fileio.MatchFiles(scope, "gs://my-bucket/*")` returns only 
objects with no `/` in their name. Objects like `dir/subdir/file.txt` are 
silently excluded. Same for `"gs://my-bucket/**"`
   
   Suggested fix: Replace `filepath.Match` with a matcher that doesn't treat 
`/` as a separator for cloud storage schemes, or add `**` support similar to 
the Java SDK.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to