Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

samples.api-client.manager.manager_test: test_add_patch_delete_rs256 failed #141

Closed
flaky-bot bot opened this issue Jul 13, 2021 · 0 comments
Closed
Assignees
Labels
api: cloudiot Issues related to the googleapis/python-iot API. 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 13, 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: c420c21
buildURL: Build Status, Sponge
status: failed

Test output
args = (device {
  name: "projects/python-docs-samples-tests/locations/us-central1/registries/test-registry-d1e57d0645ac42ceb...  seconds: 1626167359
      nanos: 9140000
    }
  }
  gateway_config {
  }
}
update_mask {
  paths: "credentials"
}
,)
kwargs = {'metadata': [('x-goog-request-params', 'device.name=projects/python-docs-samples-tests/locations/us-central1/registri...c-1626167346/devices/2714760843187157'), ('x-goog-api-client', 'gl-python/3.6.13 grpc/1.38.1 gax/1.31.0 gapic/2.2.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 0x7f7d643e7a20>
request = device {
name: "projects/python-docs-samples-tests/locations/us-central1/registries/test-registry-d1e57d0645ac42cebd... seconds: 1626167359
nanos: 9140000
}
}
gateway_config {
}
}
update_mask {
paths: "credentials"
}

timeout = None
metadata = [('x-goog-request-params', 'device.name=projects/python-docs-samples-tests/locations/us-central1/registries/test-regis...cc-1626167346/devices/2714760843187157'), ('x-goog-api-client', 'gl-python/3.6.13 grpc/1.38.1 gax/1.31.0 gapic/2.2.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 0x7f7d6445a940>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7f7d64451a88>
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":"@1626167359.446721058","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:

test_topic = name: "projects/python-docs-samples-tests/topics/test-device-events-36bb52f5-d562-45c9-8ca3-e5088f98284f"

capsys = <_pytest.capture.CaptureFixture object at 0x7f7d643e70f0>

def test_add_patch_delete_rs256(test_topic, capsys):
    device_id = device_id_template.format("PATCHME")
    manager.open_registry(
        service_account_json, project_id, cloud_region, pubsub_topic, registry_id
    )

    manager.create_rs256_device(
        service_account_json,
        project_id,
        cloud_region,
        registry_id,
        device_id,
        rsa_cert_path,
    )

    manager.get_device(
        service_account_json, project_id, cloud_region, registry_id, device_id
    )
    out, _ = capsys.readouterr()
    assert "format : RSA_X509_PEM" in out

    manager.patch_es256_auth(
        service_account_json,
        project_id,
        cloud_region,
        registry_id,
        device_id,
      es_cert_path,
    )

manager_test.py:364:


manager.py:535: in patch_es256_auth
return client.update_device(request={"device": device, "update_mask": mask})
../../../google/cloud/iot_v1/services/device_manager/client.py:980: in update_device
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/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 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 13, 2021
@product-auto-label product-auto-label bot added api: cloudiot Issues related to the googleapis/python-iot API. samples Issues that are directly related to samples. labels Jul 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: cloudiot Issues related to the googleapis/python-iot API. 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

2 participants