RushabhRatnaparkhi opened a new pull request, #37488:
URL: https://github.com/apache/beam/pull/37488

   Resolves #37445
   
   ### What changes were proposed in this pull request?
   
   `FileSystems.get_filesystem()` previously raised a `ValueError` for `gs://`
   paths when GCP dependencies were not installed, while `s3://` paths returned
   a filesystem object and deferred dependency validation until usage time.
   
   This pull request aligns GCS behavior with S3 by making GCS filesystem lookup
   lazy. `get_filesystem()` now returns a `GCSFileSystem` instance without
   requiring `apache-beam[gcp]`, deferring dependency validation until the
   filesystem is actually used (for example, on `open`, `match`, etc.).
   
   A regression test has been added to ensure that GCS filesystem lookup does 
not
   require GCP extras and that dependency errors are raised only at usage time.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [x] Addresses #37445
    - [ ] Update `CHANGES.md` with noteworthy changes (not required; no 
user-facing API change)
    - [x] This change is small and does not require an Apache ICLA
   
   ### How was this tested?
   
   - Added a unit test verifying that `FileSystems.get_filesystem("gs://...")`
     succeeds without `apache-beam[gcp]` installed.
   - Manually verified that GCP dependency errors are raised only when invoking
     filesystem operations (e.g., `open`) and not during lookup.
   


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