Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Windows wheel is built without GCS support #35193

Closed
yan-hic opened this issue Apr 17, 2023 · 4 comments · Fixed by #35255
Closed

[Python] Windows wheel is built without GCS support #35193

yan-hic opened this issue Apr 17, 2023 · 4 comments · Fixed by #35255

Comments

@yan-hic
Copy link

yan-hic commented Apr 17, 2023

Describe the bug, including details regarding any error messages, version, and platform.

Error using latest 11.0 on Windows.
I suspect pyarrow-11.0.0-cp311-cp311-win_amd64.whl has no GCS support, and maybe others.

Component(s)

Python

@westonpace westonpace changed the title pyarrow.lib.ArrowNotImplementedError: Got GCS URI but Arrow compiled without GCS support [Python] pyarrow.lib.ArrowNotImplementedError: Got GCS URI but Arrow compiled without GCS support Apr 18, 2023
@raulcd
Copy link
Member

raulcd commented Apr 18, 2023

When we originally added GCS support it was not enabled for Windows wheels. This is the original PR: #12763
We don't enable ARROW_GCS when building Windows wheels as seen here: https://github.com/apache/arrow/blob/main/ci/scripts/python_wheel_windows_build.bat#L32-L50
See Unix wheel for reference: https://github.com/apache/arrow/blob/main/ci/scripts/python_wheel_unix_test.sh#L34

I have tried to find if there's an issue opened for it but I can't find anything. I am unsure if there's a reason for it as I am no expert on GCS but at the moment we don't build ARROW_GCS on Windows wheels.

@yan-hic
Copy link
Author

yan-hic commented Apr 18, 2023

Alright - we are using linux in prod containers, and I can use WSL for Py interpreter for dev, however, it would be good to post a disclaimer in the doc about what's not included in the Windows wheels. Feel free to close.

@westonpace
Copy link
Member

I'm not sure the rationale either but I don't think we should close this. Let's leave it open to add support for GCS on Windows wheels. We do build GCS for our windows C++ CI tests (appveyor) so I'm not sure why it was excluded from wheels. It's possible it was just an oversight.

@raulcd raulcd changed the title [Python] pyarrow.lib.ArrowNotImplementedError: Got GCS URI but Arrow compiled without GCS support [Python] Windows wheel is built without GCS support Apr 18, 2023
@raulcd
Copy link
Member

raulcd commented Apr 18, 2023

I agree with @westonpace . I've modified the title so it is easier to find in the future. Thanks for opening the issue!

assignUser pushed a commit that referenced this issue May 16, 2023
### Rationale for this change

 GCS could be enabled on Windows wheels.

### What changes are included in this PR?

Enabling GCS on Windows wheel

### Are these changes tested?

Crossbow jobs for wheels run tests for GCS now.
I have tested locally that I can install the built wheel and I can import `GcsFileSystem`:
```
Python 3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32

Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated.  Libraries may fail to load.  To activate this environment
please see https://conda.io/activation

Type "help", "copyright", "credits" or "license" for more information.
>>> from pyarrow.fs import GcsFileSystem
>>> fs = GcsFileSystem(access_token='abc',target_service_account='service_account@ apache',credential_token_expiration=datetime.now(),default_bucket_location='us-west2',scheme='https', endpoint_override='localhost:8999')
>>> fs.default_bucket_location
'us-west2'
>>> fs.create_dir('hello')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyarrow\_fs.pyx", line 593, in pyarrow._fs.FileSystem.create_dir
  File "pyarrow\error.pxi", line 113, in pyarrow.lib.check_status
PermissionError: [Errno 13] google::cloud::Status(UNAUTHENTICATED: Permanent error GetBucketMetadata: Could not create a OAuth2 access token to authenticate the request. The request was not sent, as such an access token is required to complete the request successfully. Learn more about Google Cloud authentication at https://cloud.google.com/docs/authentication. The underlying error message was: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.). Detail: [errno 13] Permission denied
```

### Are there any user-facing changes?

No but Windows wheels should contain `ARROW_GCS`
* Closes: #35193

Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
@assignUser assignUser added this to the 13.0.0 milestone May 16, 2023
rtpsw pushed a commit to rtpsw/arrow that referenced this issue May 16, 2023
…che#35255)

### Rationale for this change

 GCS could be enabled on Windows wheels.

### What changes are included in this PR?

Enabling GCS on Windows wheel

### Are these changes tested?

Crossbow jobs for wheels run tests for GCS now.
I have tested locally that I can install the built wheel and I can import `GcsFileSystem`:
```
Python 3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32

Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated.  Libraries may fail to load.  To activate this environment
please see https://conda.io/activation

Type "help", "copyright", "credits" or "license" for more information.
>>> from pyarrow.fs import GcsFileSystem
>>> fs = GcsFileSystem(access_token='abc',target_service_account='service_account@ apache',credential_token_expiration=datetime.now(),default_bucket_location='us-west2',scheme='https', endpoint_override='localhost:8999')
>>> fs.default_bucket_location
'us-west2'
>>> fs.create_dir('hello')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyarrow\_fs.pyx", line 593, in pyarrow._fs.FileSystem.create_dir
  File "pyarrow\error.pxi", line 113, in pyarrow.lib.check_status
PermissionError: [Errno 13] google::cloud::Status(UNAUTHENTICATED: Permanent error GetBucketMetadata: Could not create a OAuth2 access token to authenticate the request. The request was not sent, as such an access token is required to complete the request successfully. Learn more about Google Cloud authentication at https://cloud.google.com/docs/authentication. The underlying error message was: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.). Detail: [errno 13] Permission denied
```

### Are there any user-facing changes?

No but Windows wheels should contain `ARROW_GCS`
* Closes: apache#35193

Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants