CP: Plug transform annotations thru cross-lang interface (#33150) #33156
GitHub Actions / Test Results
failed
Nov 18, 2024 in 0s
1 fail, 70 skipped, 201 pass in 3m 10s
2 files 2 suites 3m 10s ⏱️
272 tests 201 ✅ 70 💤 1 ❌
278 runs 201 ✅ 76 💤 1 ❌
Results for commit 3867d24.
Annotations
github-actions / Test Results
test_with_gcs_location_with_none_options (apache_beam.ml.transforms.base_test.TestJsonPickleTransformAttributeManager) failed
sdks/python/test-suites/tox/py39/build/srcs/sdks/python/pytest_py39-ml.xml [took 0s]
Raw output
google.api_core.exceptions.Forbidden: 403 GET https://storage.googleapis.com/storage/v1/b/fake_path/o/attributes.json?projection=noAcl&prettyPrint=false: [email protected] does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).
self = <apache_beam.ml.transforms.base_test.TestJsonPickleTransformAttributeManager testMethod=test_with_gcs_location_with_none_options>
@unittest.skipIf(apiclient is None, 'apache_beam[gcp] is not installed.')
def test_with_gcs_location_with_none_options(self):
path = 'gs://fake_path'
with self.assertRaises(RuntimeError):
> self.attribute_manager.save_attributes(
ptransform_list=[], artifact_location=path, options=None)
apache_beam/ml/transforms/base_test.py:704:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/apache_beam/ml/transforms/base.py:473: in save_attributes
if FileSystems.exists(FileSystems.join(artifact_location,
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/apache_beam/io/filesystems.py:325: in exists
return filesystem.exists(path)
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/apache_beam/io/gcp/gcsfilesystem.py:281: in exists
return self._gcsIO().exists(path)
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/apache_beam/io/gcp/gcsio.py:411: in exists
self._gcs_object(path)
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/apache_beam/io/gcp/gcsio.py:488: in _gcs_object
blob = bucket.get_blob(blob_name, retry=self._storage_client_retry)
/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/contextlib.py:79: in inner
return func(*args, **kwds)
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/google/cloud/storage/bucket.py:1283: in get_blob
blob.reload(
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/google/cloud/storage/_helpers.py:300: in reload
api_response = client._get_resource(
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/google/cloud/storage/client.py:464: in _get_resource
return self._connection.api_request(
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/google/cloud/storage/_http.py:90: in api_request
return call()
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/google/api_core/retry/retry_unary.py:293: in retry_wrapped_func
return retry_target(
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/google/api_core/retry/retry_unary.py:153: in retry_target
_retry_error_helper(
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/google/api_core/retry/retry_base.py:212: in _retry_error_helper
raise final_exc from source_exc
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/google/api_core/retry/retry_unary.py:144: in retry_target
result = target()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def api_request(
self,
method,
path,
query_params=None,
data=None,
content_type=None,
headers=None,
api_base_url=None,
api_version=None,
expect_json=True,
_target_object=None,
timeout=_DEFAULT_TIMEOUT,
extra_api_info=None,
):
"""Make a request over the HTTP transport to the API.
You shouldn't need to use this method, but if you plan to
interact with the API using these primitives, this is the
correct one to use.
:type method: str
:param method: The HTTP method name (ie, ``GET``, ``POST``, etc).
Required.
:type path: str
:param path: The path to the resource (ie, ``'/b/bucket-name'``).
Required.
:type query_params: dict or list
:param query_params: A dictionary of keys and values (or list of
key-value pairs) to insert into the query
string of the URL.
:type data: str
:param data: The data to send as the body of the request. Default is
the empty string.
:type content_type: str
:param content_type: The proper MIME type of the data provided. Default
is None.
:type headers: dict
:param headers: extra HTTP headers to be sent with the request.
:type api_base_url: str
:param api_base_url: The base URL for the API endpoint.
Typically you won't have to provide this.
Default is the standard API base URL.
:type api_version: str
:param api_version: The version of the API to call. Typically
you shouldn't provide this and instead use
the default for the library. Default is the
latest API version supported by
google-cloud-python.
:type expect_json: bool
:param expect_json: If True, this method will try to parse the
response as JSON and raise an exception if
that cannot be done. Default is True.
:type _target_object: :class:`object`
:param _target_object:
(Optional) Protected argument to be used by library callers. This
can allow custom behavior, for example, to defer an HTTP request
and complete initialization of the object at a later time.
:type timeout: float or tuple
:param timeout: (optional) The amount of time, in seconds, to wait
for the server response.
Can also be passed as a tuple (connect_timeout, read_timeout).
See :meth:`requests.Session.request` documentation for details.
:type extra_api_info: string
:param extra_api_info: (optional) Extra api info to be appended to
the X-Goog-API-Client header
:raises ~google.cloud.exceptions.GoogleCloudError: if the response code
is not 200 OK.
:raises ValueError: if the response content type is not JSON.
:rtype: dict or str
:returns: The API response payload, either as a raw string or
a dictionary if the response is valid JSON.
"""
url = self.build_api_url(
path=path,
query_params=query_params,
api_base_url=api_base_url,
api_version=api_version,
)
# Making the executive decision that any dictionary
# data will be sent properly as JSON.
if data and isinstance(data, dict):
data = json.dumps(data)
content_type = "application/json"
response = self._make_request(
method=method,
url=url,
data=data,
content_type=content_type,
headers=headers,
target_object=_target_object,
timeout=timeout,
extra_api_info=extra_api_info,
)
if not 200 <= response.status_code < 300:
> raise exceptions.from_http_response(response)
E google.api_core.exceptions.Forbidden: 403 GET https://storage.googleapis.com/storage/v1/b/fake_path/o/attributes.json?projection=noAcl&prettyPrint=false: [email protected] does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).
target/.tox-py39-ml/py39-ml/lib/python3.9/site-packages/google/cloud/_http/__init__.py:494: Forbidden
Loading