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

samples.snippets.quickstart_analyzeiampolicylongrunning_test: test_analyze_iam_policy_longrunning failed #220

Closed
flaky-bot bot opened this issue Jul 4, 2021 · 5 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 4, 2021

Note: #201 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: 689f614
buildURL: Build Status, Sponge
status: failed

Test output
analysis_bucket = 'analysis-274226035744123191166358520005194644200'
dataset = 'analysis_134796195342119876537145394225422710476'
capsys = <_pytest.capture.CaptureFixture object at 0x7f1f9297bc50>
def test_analyze_iam_policy_longrunning(analysis_bucket, dataset, capsys):
    dump_file_path = "gs://{}/analysis-dump.txt".format(analysis_bucket)
  quickstart_analyzeiampolicylongrunning.analyze_iam_policy_longrunning_gcs(PROJECT, dump_file_path)

quickstart_analyzeiampolicylongrunning_test.py:70:


quickstart_analyzeiampolicylongrunning.py:44: in analyze_iam_policy_longrunning_gcs
operation.result(300)


self = <google.api_core.operation.Operation object at 0x7f1f908f3278>
timeout = 300, retry = <google.api_core.retry.Retry object at 0x7f1f92cbc8d0>

def result(self, timeout=None, retry=DEFAULT_RETRY):
    """Get the result of the operation, blocking if necessary.

    Args:
        timeout (int):
            How long (in seconds) to wait for the operation to complete.
            If None, wait indefinitely.

    Returns:
        google.protobuf.Message: The Operation's result.

    Raises:
        google.api_core.GoogleAPICallError: If the operation errors or if
            the timeout is reached before the operation completes.
    """
    kwargs = {} if retry is DEFAULT_RETRY else {"retry": retry}
    self._blocking_poll(timeout=timeout, **kwargs)

    if self._exception is not None:
        # pylint: disable=raising-bad-type
        # Pylint doesn't recognize that this is valid in this case.
      raise self._exception

E google.api_core.exceptions.InternalServerError: 500 Job failed. Please consult the support team with the operation name.

.nox/py-3-6/lib/python3.6/site-packages/google/api_core/future/polling.py:134: InternalServerError

@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 4, 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 4, 2021
@flaky-bot flaky-bot bot added the flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. label Jul 4, 2021
@flaky-bot
Copy link
Author

flaky-bot bot commented Jul 4, 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 (689f614), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

@busunkim96
Copy link
Contributor

E google.api_core.exceptions.InternalServerError: 500 Job failed. Please consult the support team with the operation name.

This is a 500 error. If this continues to happen we can reach out to the Asset team.

@flaky-bot
Copy link
Author

flaky-bot bot commented Jul 13, 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: 2bd52e2
buildURL: Build Status, Sponge
status: failed

Test output
args = (name: "projects/python-docs-samples-tests/operations/AnalyzeIamPolicyLongrunning/1457884364250148591814578843642501485083"
,)
kwargs = {'metadata': [('x-goog-request-params', 'name=projects/python-docs-samples-tests/operations/AnalyzeIamPolicyLongrunnin...64250148591814578843642501485083'), ('x-goog-api-client', 'gl-python/3.6.13 grpc/1.38.1 gax/1.31.0')], 'timeout': 20.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 0x7f6d92947ba8>
request = name: "projects/python-docs-samples-tests/operations/AnalyzeIamPolicyLongrunning/1457884364250148591814578843642501485083"

timeout = 20.0
metadata = [('x-goog-request-params', 'name=projects/python-docs-samples-tests/operations/AnalyzeIamPolicyLongrunning/1457884364250148591814578843642501485083'), ('x-goog-api-client', 'gl-python/3.6.13 grpc/1.38.1 gax/1.31.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 0x7f6d929504a8>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7f6d9293e848>
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.UNAUTHENTICATED
E details = "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."
E debug_error_string = "{"created":"@1626167188.675091372","description":"Error received from peer ipv4:74.125.195.95:443","file":"src/core/lib/surface/call.cc","file_line":1066,"grpc_message":"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.","grpc_status":16}"
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:

analysis_bucket = 'analysis-164694859564238031831505341207025140802'
dataset = 'analysis_192203546152491822754702348742599891505'
capsys = <_pytest.capture.CaptureFixture object at 0x7f6d92938eb8>

def test_analyze_iam_policy_longrunning(analysis_bucket, dataset, capsys):
    dump_file_path = "gs://{}/analysis-dump.txt".format(analysis_bucket)
  quickstart_analyzeiampolicylongrunning.analyze_iam_policy_longrunning_gcs(PROJECT, dump_file_path)

quickstart_analyzeiampolicylongrunning_test.py:70:


quickstart_analyzeiampolicylongrunning.py:44: in analyze_iam_policy_longrunning_gcs
operation.result(300)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/future/polling.py:130: in result
self._blocking_poll(timeout=timeout, **kwargs)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/future/polling.py:108: in blocking_poll
retry
(self._done_or_raise)(**kwargs)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/retry.py:290: in retry_wrapped_func
on_error=on_error,
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/retry.py:188: in retry_target
return target()
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/future/polling.py:86: in _done_or_raise
if not self.done(**kwargs):
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/operation.py:170: in done
self._refresh_and_update(retry)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/operation.py:158: in _refresh_and_update
self._operation = self._refresh(retry=retry)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/operations_v1/operations_client.py:143: in get_operation
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:290: in retry_wrapped_func
on_error=on_error,
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/retry.py:188: in retry_target
return target()
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/timeout.py:214: in func_with_timeout
return func(*args, **kwargs)
.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.UNAUTHENTICATED
details = "Request had invalid a...entication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.","grpc_status":16}"

???
E google.api_core.exceptions.Unauthenticated: 401 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.

:3: Unauthenticated

@flaky-bot flaky-bot bot reopened this Jul 13, 2021
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Jul 13, 2021
@parthea
Copy link
Contributor

parthea commented Jul 14, 2021

I'm going to close this again and see if the issue repeats.

@parthea parthea closed this as completed Jul 14, 2021
@parthea parthea removed the 🚨 This issue needs some love. label Jul 14, 2021
@busunkim96
Copy link
Contributor

Side note: It looks like yesterday's failure was due to the expired keyfile for the sample's service account. I must have not closed it because it was created earlier.

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

3 participants