Description
Note: #583 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.
commit: 9d505f1
buildURL: Build Status, Sponge
status: failed
Test output
self =def test_log_text_with_timestamp(self): text_payload = "System test: test_log_text_with_timestamp" gapic_logger = Config.CLIENT.logger(self._logger_name("log_text_ts")) http_logger = Config.HTTP_CLIENT.logger(self._logger_name("log_text_ts_http")) now = datetime.utcnow() loggers = ( [gapic_logger] if Config.use_mtls == "always" else [gapic_logger, http_logger] ) for logger in loggers: self.to_delete.append(logger) logger.log_text(text_payload, timestamp=now)
entries = _list_entries(logger)
tests/system/test_system.py:342:
tests/system/test_system.py:86: in _list_entries
return outer(logger)
.nox/prerelease_deps-3-8/lib/python3.8/site-packages/test_utils/retry.py:100: in wrapped_function
return to_wrap(*args, **kwargs)
.nox/prerelease_deps-3-8/lib/python3.8/site-packages/test_utils/retry.py:157: in wrapped_function
result = to_wrap(*args, **kwargs)
tests/system/test_system.py:64: in consume_entries
return list(logger.list_entries(filter=_time_filter))
google/cloud/logging_v2/_http.py:490: in _entries_pager
for page in page_iter:
.nox/prerelease_deps-3-8/lib/python3.8/site-packages/google/api_core/page_iterator.py:208: in _items_iter
for page in self._page_iter(increment=False):
.nox/prerelease_deps-3-8/lib/python3.8/site-packages/google/api_core/page_iterator.py:244: in _page_iter
page = self._next_page()
.nox/prerelease_deps-3-8/lib/python3.8/site-packages/google/api_core/page_iterator.py:373: in _next_page
response = self._get_next_page_response()
.nox/prerelease_deps-3-8/lib/python3.8/site-packages/google/api_core/page_iterator.py:436: in _get_next_page_response
return self.api_request(
self = <google.cloud.logging_v2._http.Connection object at 0x7fc30f72bca0>
method = 'POST', path = '/entries:list', query_params = None
data = '{"resourceNames": ["projects/precise-truck-742"], "filter": "timestamp>=\"2022-12-14T20:34:01.411667+0000\" AND logName=projects/precise-truck-742/logs/log_text_ts_http-1671051035621"}'
content_type = 'application/json', headers = None, api_base_url = None
api_version = None, expect_json = True, _target_object = None, timeout = 60
extra_api_info = Nonedef 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.TooManyRequests: 429 POST https://logging.googleapis.com/v2/entries:list?prettyPrint=false: Quota exceeded for quota metric 'Read requests' and limit 'Read requests per minute per user' of service 'logging.googleapis.com' for consumer 'project_number:1065521786570'. [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'RATE_LIMIT_EXCEEDED', 'domain': 'googleapis.com', 'metadata': {'quota_limit_value': '180', 'quota_metric': 'logging.googleapis.com/read_requests', 'quota_location': 'global', 'quota_limit': 'ReadRequestsPerMinutePerUser', 'service': 'logging.googleapis.com', 'consumer': 'projects/1065521786570'}}, {'@type': 'type.googleapis.com/google.rpc.Help', 'links': [{'description': 'Request a higher quota limit.', 'url': 'https://cloud.google.com/docs/quota#requesting_higher_quota'}]}]
.nox/prerelease_deps-3-8/lib/python3.8/site-packages/google/cloud/_http/init.py:494: TooManyRequests