hjtran commented on issue #37445:
URL: https://github.com/apache/beam/issues/37445#issuecomment-3929573686

   > Hi [@hjtran](https://github.com/hjtran). I just came across this issue and 
saw a lot of interests here (which is great!).
   > 
   > I would like to understand the rationale behind the proposed behavior a 
bit more. To me, I'm more inclined toward the 'fail-fast' approach of 
GCSFileSystem, which provides immediate feedback if a required dependency is 
missing.
   > 
   > Could you elaborate on your specific use case? Particularly, why deferring 
validation to usage time is preferable for your scenario?
   > 
   > > Proposed Behavior
   > > Both should behave consistently. GCSFileSystem should be returned from 
get_filesystem() like S3FileSystem, allowing callers to validate dependencies 
when the filesystem is actually used rather than at lookup time.
   
   Hey @shunping 
   For my use case, it's optional whether or not the GCS dependencies are 
installed. I want to be able to do something like `if 
Filesystems.get_filesystem(user_provided_path) is GCSFileSystem: raise 
RuntimeError("You haven't installed GCS dependencies!")`.
   
   I can do this today with `S3Filesystem`, but not with `GCSFilesystem`. I can 
do a manual `if path.startswith("gcs")`, but this is a bit awkward especially 
since S3 doesn't require it


-- 
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