You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "johannaojeling (via GitHub)" <gi...@apache.org> on 2023/03/12 10:13:56 UTC

[GitHub] [beam] johannaojeling opened a new issue, #25810: [Bug][Go SDK]: GCS filesystem List does not always expand glob and lists non-existent objects

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

   ### What happened?
   
   The GCS fs.List method has a different behavior than the other filesystem implementations: if the prefix part of the URI provided has a wildcard as its first character, or no wildcard at all, there is no matching taking place but a slice with the input glob is simply returned.
   
   It means that a glob may not be expanded, and that a path to a non-existent bucket/object may be successfully listed, which leads to errors in downstream read and metadata operations.
   
   Example:
   
   Given these objects exist:
   - gs://my-bucket/file1.txt
   - gs://my-bucket/file2.txt
   
   Path with '*' as first character in prefix:
   ```go
   glob := "gs://my-bucket/*.txt"
   fs, _ := filesystem.New(ctx, glob)
   got, _ := fs.List(ctx, glob)
   // got: []string{"gs://my-bucket/*.txt"}
   // want: []string{"gs://my-bucket/file1.txt", "gs://my-bucket/file2.txt"}
   ```
   
   Path to non-existent object:
   
   ```go
   glob := "gs://my-bucket/non-existent.txt"
   fs, _ := filesystem.New(ctx, glob)
   got, _ := fs.List(ctx, glob)
   // got: []string{"gs://my-bucket/non-existent.txt"}
   // want: nil
   ```
   
   I would suggest to align the List behavior across the filesystems and return nil if there are no matching files.
   
   ### Issue Priority
   
   Priority: 2 (default / most bugs should be filed as P2)
   
   ### Issue Components
   
   - [ ] Component: Python SDK
   - [ ] Component: Java SDK
   - [X] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [ ] Component: IO connector
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Samza Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
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: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] lostluck closed issue #25810: [Bug][Go SDK]: GCS filesystem List does not always expand glob and lists non-existent objects

Posted by "lostluck (via GitHub)" <gi...@apache.org>.
lostluck closed issue #25810: [Bug][Go SDK]: GCS filesystem List does not always expand glob and lists non-existent objects
URL: https://github.com/apache/beam/issues/25810


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] johannaojeling commented on issue #25810: [Bug][Go SDK]: GCS filesystem List does not always expand glob and lists non-existent objects

Posted by "johannaojeling (via GitHub)" <gi...@apache.org>.
johannaojeling commented on issue #25810:
URL: https://github.com/apache/beam/issues/25810#issuecomment-1465149290

   .take-issue


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org