Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

samples.snippets.quickstart_searchallresources_test: test_search_all_resources failed #254

Closed
flaky-bot bot opened this issue Jul 31, 2021 · 6 comments
Labels
api: cloudasset Issues related to the googleapis/python-asset API. flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented Jul 31, 2021

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a7fa664
buildURL: Build Status, Sponge
status: failed

Test output
args = (scope: "projects/python-docs-samples-tests"
query: "name:dataset_49ad58d1f58b4f71bc5ebde287c0b381"
,)
kwargs = {'metadata': [('x-goog-request-params', 'scope=projects/python-docs-samples-tests'), ('x-goog-api-client', 'gl-python/3.6.13 grpc/1.39.0 gax/1.31.1 gapic/3.3.0')]}
@six.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
      return callable_(*args, **kwargs)

.nox/py-3-6/lib/python3.6/site-packages/google/api_core/grpc_helpers.py:67:


self = <grpc._channel._UnaryUnaryMultiCallable object at 0x7fc489d18ba8>
request = scope: "projects/python-docs-samples-tests"
query: "name:dataset_49ad58d1f58b4f71bc5ebde287c0b381"

timeout = None
metadata = [('x-goog-request-params', 'scope=projects/python-docs-samples-tests'), ('x-goog-api-client', 'gl-python/3.6.13 grpc/1.39.0 gax/1.31.1 gapic/3.3.0')]
credentials = None, wait_for_ready = None, compression = None

def __call__(self,
             request,
             timeout=None,
             metadata=None,
             credentials=None,
             wait_for_ready=None,
             compression=None):
    state, call, = self._blocking(request, timeout, metadata, credentials,
                                  wait_for_ready, compression)
  return _end_unary_response_blocking(state, call, False, None)

.nox/py-3-6/lib/python3.6/site-packages/grpc/_channel.py:946:


state = <grpc._channel._RPCState object at 0x7fc489cfa2b0>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7fc489d07c08>
with_call = False, deadline = None

def _end_unary_response_blocking(state, call, with_call, deadline):
    if state.code is grpc.StatusCode.OK:
        if with_call:
            rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
            return state.response, rendezvous
        else:
            return state.response
    else:
      raise _InactiveRpcError(state)

E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.RESOURCE_EXHAUSTED
E details = "Resource has been exhausted (e.g. check quota)."
E debug_error_string = "{"created":"@1627722372.064070458","description":"Error received from peer ipv4:74.125.195.95:443","file":"src/core/lib/surface/call.cc","file_line":1069,"grpc_message":"Resource has been exhausted (e.g. check quota).","grpc_status":8}"
E >

.nox/py-3-6/lib/python3.6/site-packages/grpc/_channel.py:849: _InactiveRpcError

The above exception was the direct cause of the following exception:

asset_dataset = 'dataset_49ad58d1f58b4f71bc5ebde287c0b381'
capsys = <_pytest.capture.CaptureFixture object at 0x7fc489e55e80>

@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_search_all_resources(asset_dataset, capsys):
    scope = "projects/{}".format(PROJECT)
    query = "name:{}".format(DATASET)

    # Dataset creation takes some time to propagate, so the dataset is not
    # immediately searchable. Need some time before the snippet will pass.
    @backoff.on_exception(backoff.expo, (AssertionError), max_time=240)
    def eventually_consistent_test():
        quickstart_searchallresources.search_all_resources(scope, query=query)
        out, _ = capsys.readouterr()

        assert DATASET in out
  eventually_consistent_test()

quickstart_searchallresources_test.py:63:


.nox/py-3-6/lib/python3.6/site-packages/backoff/_sync.py:94: in retry
ret = target(*args, **kwargs)
quickstart_searchallresources_test.py:58: in eventually_consistent_test
quickstart_searchallresources.search_all_resources(scope, query=query)
quickstart_searchallresources.py:40: in search_all_resources
"order_by": order_by,
../../google/cloud/asset_v1/services/asset_service/client.py:1148: in search_all_resources
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/gapic_v1/method.py:145: in call
return wrapped_func(*args, **kwargs)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/retry.py:291: in retry_wrapped_func
on_error=on_error,
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/retry.py:189: in retry_target
return target()
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/grpc_helpers.py:69: in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)


value = None
from_value = <_InactiveRpcError of RPC that terminated with:
status = StatusCode.RESOURCE_EXHAUSTED
details = "Resource has been .../surface/call.cc","file_line":1069,"grpc_message":"Resource has been exhausted (e.g. check quota).","grpc_status":8}"

???
E google.api_core.exceptions.ResourceExhausted: 429 Resource has been exhausted (e.g. check quota).

:3: ResourceExhausted

@flaky-bot flaky-bot bot added flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jul 31, 2021
@product-auto-label product-auto-label bot added api: cloudasset Issues related to the googleapis/python-asset API. samples Issues that are directly related to samples. labels Jul 31, 2021
@flaky-bot flaky-bot bot added the flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. label Jul 31, 2021
@flaky-bot
Copy link
Author

flaky-bot bot commented Jul 31, 2021

Looks like this issue is flaky. 😟

I'm going to leave this open and stop commenting.

A human should fix and close this.


When run at the same commit (a7fa664), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

@busunkim96
Copy link
Contributor

Failure was due to exhausted quota, closing.

@flaky-bot flaky-bot bot reopened this Aug 14, 2021
@flaky-bot
Copy link
Author

flaky-bot bot commented Aug 14, 2021

Oops! Looks like this issue is still flaky. It failed again. 😬

I reopened the issue, but a human will need to close it again.


commit: c79d51d
buildURL: Build Status, Sponge
status: failed

Test output
args = (scope: "projects/python-docs-samples-tests"
query: "name:dataset_a3181bb7b3a4489f95b89c4aa7ad9c9e"
,)
kwargs = {'metadata': [('x-goog-request-params', 'scope=projects/python-docs-samples-tests'), ('x-goog-api-client', 'gl-python/3.8.8 grpc/1.39.0 gax/1.31.1 gapic/3.3.0')]}
@six.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
      return callable_(*args, **kwargs)

.nox/py-3-8/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:67:


self = <grpc._channel._UnaryUnaryMultiCallable object at 0x7f52e0117280>
request = scope: "projects/python-docs-samples-tests"
query: "name:dataset_a3181bb7b3a4489f95b89c4aa7ad9c9e"

timeout = None
metadata = [('x-goog-request-params', 'scope=projects/python-docs-samples-tests'), ('x-goog-api-client', 'gl-python/3.8.8 grpc/1.39.0 gax/1.31.1 gapic/3.3.0')]
credentials = None, wait_for_ready = None, compression = None

def __call__(self,
             request,
             timeout=None,
             metadata=None,
             credentials=None,
             wait_for_ready=None,
             compression=None):
    state, call, = self._blocking(request, timeout, metadata, credentials,
                                  wait_for_ready, compression)
  return _end_unary_response_blocking(state, call, False, None)

.nox/py-3-8/lib/python3.8/site-packages/grpc/_channel.py:946:


state = <grpc._channel._RPCState object at 0x7f52dfce2a00>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7f52dfb92e00>
with_call = False, deadline = None

def _end_unary_response_blocking(state, call, with_call, deadline):
    if state.code is grpc.StatusCode.OK:
        if with_call:
            rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
            return state.response, rendezvous
        else:
            return state.response
    else:
      raise _InactiveRpcError(state)

E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.RESOURCE_EXHAUSTED
E details = "Resource has been exhausted (e.g. check quota)."
E debug_error_string = "{"created":"@1628939402.034663103","description":"Error received from peer ipv4:74.125.142.95:443","file":"src/core/lib/surface/call.cc","file_line":1069,"grpc_message":"Resource has been exhausted (e.g. check quota).","grpc_status":8}"
E >

.nox/py-3-8/lib/python3.8/site-packages/grpc/_channel.py:849: _InactiveRpcError

The above exception was the direct cause of the following exception:

asset_dataset = 'dataset_a3181bb7b3a4489f95b89c4aa7ad9c9e'
capsys = <_pytest.capture.CaptureFixture object at 0x7f52dd85cbb0>

@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_search_all_resources(asset_dataset, capsys):
    scope = "projects/{}".format(PROJECT)
    query = "name:{}".format(DATASET)

    # Dataset creation takes some time to propagate, so the dataset is not
    # immediately searchable. Need some time before the snippet will pass.
    @backoff.on_exception(backoff.expo, (AssertionError), max_time=240)
    def eventually_consistent_test():
        quickstart_searchallresources.search_all_resources(scope, query=query)
        out, _ = capsys.readouterr()

        assert DATASET in out
  eventually_consistent_test()

quickstart_searchallresources_test.py:63:


.nox/py-3-8/lib/python3.8/site-packages/backoff/_sync.py:94: in retry
ret = target(*args, **kwargs)
quickstart_searchallresources_test.py:58: in eventually_consistent_test
quickstart_searchallresources.search_all_resources(scope, query=query)
quickstart_searchallresources.py:34: in search_all_resources
response = client.search_all_resources(
../../google/cloud/asset_v1/services/asset_service/client.py:1148: in search_all_resources
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
.nox/py-3-8/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py:145: in call
return wrapped_func(*args, **kwargs)
.nox/py-3-8/lib/python3.8/site-packages/google/api_core/retry.py:286: in retry_wrapped_func
return retry_target(
.nox/py-3-8/lib/python3.8/site-packages/google/api_core/retry.py:189: in retry_target
return target()
.nox/py-3-8/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:69: in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)


value = None
from_value = <_InactiveRpcError of RPC that terminated with:
status = StatusCode.RESOURCE_EXHAUSTED
details = "Resource has been .../surface/call.cc","file_line":1069,"grpc_message":"Resource has been exhausted (e.g. check quota).","grpc_status":8}"

???
E google.api_core.exceptions.ResourceExhausted: 429 Resource has been exhausted (e.g. check quota).

:3: ResourceExhausted

@busunkim96
Copy link
Contributor

Using separate projects for each run was implemented in #253, but the nightly job rolls back to the latest release. This job will stop failing once the next release of this library is made.

@flaky-bot flaky-bot bot reopened this Aug 19, 2021
@flaky-bot
Copy link
Author

flaky-bot bot commented Aug 19, 2021

Oops! Looks like this issue is still flaky. It failed again. 😬

I reopened the issue, but a human will need to close it again.


commit: 16d8983
buildURL: Build Status, Sponge
status: failed

Test output
args = (scope: "projects/python-docs-samples-tests-py36"
query: "name:dataset_c309c3fe14b64de6b6da789465fb8143"
,)
kwargs = {'metadata': [('x-goog-request-params', 'scope=projects/python-docs-samples-tests-py36'), ('x-goog-api-client', 'gl-python/3.6.13 grpc/1.39.0 gax/1.31.2 gapic/3.3.0')]}
@six.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
      return callable_(*args, **kwargs)

.nox/py-3-6/lib/python3.6/site-packages/google/api_core/grpc_helpers.py:67:


self = <grpc._channel._UnaryUnaryMultiCallable object at 0x7fa45db71cf8>
request = scope: "projects/python-docs-samples-tests-py36"
query: "name:dataset_c309c3fe14b64de6b6da789465fb8143"

timeout = None
metadata = [('x-goog-request-params', 'scope=projects/python-docs-samples-tests-py36'), ('x-goog-api-client', 'gl-python/3.6.13 grpc/1.39.0 gax/1.31.2 gapic/3.3.0')]
credentials = None, wait_for_ready = None, compression = None

def __call__(self,
             request,
             timeout=None,
             metadata=None,
             credentials=None,
             wait_for_ready=None,
             compression=None):
    state, call, = self._blocking(request, timeout, metadata, credentials,
                                  wait_for_ready, compression)
  return _end_unary_response_blocking(state, call, False, None)

.nox/py-3-6/lib/python3.6/site-packages/grpc/_channel.py:946:


state = <grpc._channel._RPCState object at 0x7fa45db71b70>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7fa45db61f48>
with_call = False, deadline = None

def _end_unary_response_blocking(state, call, with_call, deadline):
    if state.code is grpc.StatusCode.OK:
        if with_call:
            rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
            return state.response, rendezvous
        else:
            return state.response
    else:
      raise _InactiveRpcError(state)

E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.RESOURCE_EXHAUSTED
E details = "Resource has been exhausted (e.g. check quota)."
E debug_error_string = "{"created":"@1629363936.742279532","description":"Error received from peer ipv4:74.125.142.95:443","file":"src/core/lib/surface/call.cc","file_line":1069,"grpc_message":"Resource has been exhausted (e.g. check quota).","grpc_status":8}"
E >

.nox/py-3-6/lib/python3.6/site-packages/grpc/_channel.py:849: _InactiveRpcError

The above exception was the direct cause of the following exception:

asset_dataset = 'dataset_c309c3fe14b64de6b6da789465fb8143'
capsys = <_pytest.capture.CaptureFixture object at 0x7fa45dac4dd8>

@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_search_all_resources(asset_dataset, capsys):
    scope = "projects/{}".format(PROJECT)
    query = "name:{}".format(DATASET)

    # Dataset creation takes some time to propagate, so the dataset is not
    # immediately searchable. Need some time before the snippet will pass.
    @backoff.on_exception(backoff.expo, (AssertionError), max_time=240)
    def eventually_consistent_test():
        quickstart_searchallresources.search_all_resources(scope, query=query)
        out, _ = capsys.readouterr()

        assert DATASET in out
  eventually_consistent_test()

quickstart_searchallresources_test.py:63:


.nox/py-3-6/lib/python3.6/site-packages/backoff/_sync.py:94: in retry
ret = target(*args, **kwargs)
quickstart_searchallresources_test.py:58: in eventually_consistent_test
quickstart_searchallresources.search_all_resources(scope, query=query)
quickstart_searchallresources.py:40: in search_all_resources
"order_by": order_by,
.nox/py-3-6/lib/python3.6/site-packages/google/cloud/asset_v1/services/asset_service/client.py:1148: in search_all_resources
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/gapic_v1/method.py:145: in call
return wrapped_func(*args, **kwargs)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/retry.py:291: in retry_wrapped_func
on_error=on_error,
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/retry.py:189: in retry_target
return target()
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/grpc_helpers.py:69: in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)


value = None
from_value = <_InactiveRpcError of RPC that terminated with:
status = StatusCode.RESOURCE_EXHAUSTED
details = "Resource has been .../surface/call.cc","file_line":1069,"grpc_message":"Resource has been exhausted (e.g. check quota).","grpc_status":8}"

???
E google.api_core.exceptions.ResourceExhausted: 429 Resource has been exhausted (e.g. check quota).

:3: ResourceExhausted

@busunkim96
Copy link
Contributor

See last comment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: cloudasset Issues related to the googleapis/python-asset API. flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant