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

   ### What happened?
   
   https://github.com/apache/beam/pull/23644 (and a partial fix in 
https://github.com/apache/beam/pull/23677) breaks certain pipelines if gcsio.py 
initializes credentials first.
   
   gcsio.py currently passes around dictionaries in certain situations instead 
of PipelineOptions types causing authentication to give up due to the following 
error:
   ```
   Unable to find default credentials to use: 'dict' object has no attribute 
'view_as'
   Connecting anonymously.
   ```
   
   This causes pipelines to fail with auth errors:
   ```
   apitools.base.py.exceptions.HttpUnauthorizedError: HttpError accessing 
<https://www.googleapis.com/resumable/upload/storage/v1/b/cloud-ml-benchmark-output-us-central/o?alt=json&name=df2-cloudml-benchmark-reddit-small-python-presubmit6%2F10200737556536%2Ftemp%2Fdf2-cloudml-benchmark-reddit-small-python-presubmit6-10200737556536.1666276719.656090%2Fdax-tmp-2022-10-20_07_38_49-7887649702781606893-S27-0-4db7a63035854b2a%2Ftmp-4db7a630358540d1-shard--try-25d98cd94bb07d82-endshard.avro&uploadType=resumable>:
 response: <{'x-guploader-uploadid': 
'ADPycdtyRy7Hq7selxzaj8sF3d21Wdd-BACcWNvpgZ7-Pu7RN1-3G-3UkY2YDcLGQgVQCo7Z-5tZQ7bDORmkMyHSF-gY5ZxUiodV',
 'date': 'Thu, 20 Oct 2022 14:47:54 GMT', 'vary': 'Origin, X-Origin', 
'www-authenticate': 'Bearer realm="https://accounts.google.com/";', 
'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'expires': 
'Mon, 01 Jan 1990 00:00:00 GMT', 'pragma': 'no-cache', 'content-length': '438', 
'server': 'UploadServer', 'content-type': 'text/html;
  charset=UTF-8', 'status': '401'}>, content <{
     "error": {
       "code": 401,
       "message": "Anonymous caller does not have storage.objects.create access 
to the Google Cloud Storage object.",
       "errors": [
         {
           "message": "Anonymous caller does not have storage.objects.create 
access to the Google Cloud Storage object.",
           "domain": "global",
           "reason": "required",
           "locationType": "header",
           "location": "Authorization"
         }
       ]
     }
   }
   ```
   
   ### Issue Priority
   
   Priority: 0
   
   ### Issue Component
   
   Component: sdk-py-core


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