kukanggg89 opened a new pull request, #55943: URL: https://github.com/apache/arrow/pull/55943
### Rationale for this change GcsFileSystem in R had no way to impersonate a service account, even though the C++ GcsOptions::FromImpersonatedServiceAccount factory exists and pyarrow already exposes it as target_service_account. The R binding even carried a TODO for it since ARROW-16885. ### What changes are included in this PR? - r/src/filesystem.cpp: fs___GcsFileSystem__Make now calls GcsOptions::FromImpersonatedServiceAccount with the base credentials (access token, JSON credentials, or default credentials) when target_service_account is given, and the TODO block sketching this is gone. - r/R/filesystem.R: GcsFileSystem$create() accepts target_service_account, documents it, and rejects it together with anonymous = TRUE. - r/man/FileSystem.Rd: same documentation in the generated reference page. - r/NEWS.md: entry under 26.0.1.9000. - r/tests/testthat/test-gcs.R: target_service_account round-trips through $options on top of default credentials and on top of an access token, plus the anonymous = TRUE validation case. ### Are these changes tested? New tests in r/tests/testthat/test-gcs.R cover the round-trip and the validation error. I did not run the R test suite here: this environment has no R toolchain and the package needs the built C++ library, so the tests still need CI. No live GCS bucket was used either; the tests only check that the option round-trips through $options without contacting GCS. ### Are there any user-facing changes? Yes. GcsFileSystem$create() gains a target_service_account argument, and gs_bucket() picks it up through .... No breaking change: existing calls behave as before. ### Was AI used for this PR? Drafted with help from Claude. I reviewed and revised every change myself before opening this PR. **PR code and description written by:** - [ ] Human - [ ] AI **Reviewed before submission by:** - [ ] Human - [ ] AI - [ ] Not reviewed * GitHub Issue: (filled in automatically from the PR title; change "Closes" to "Refs" for a partial fix) -- 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]
