GoogleCloudPlatform / python-docs-samples

Code samples used on cloud.google.com
Apache License 2.0
7.46k stars 6.44k forks source link

healthcare.api-client.v1.dicom.dicom_stores_test: test_export_dicom_instance failed #6825

Closed flaky-bot[bot] closed 3 years ago

flaky-bot[bot] commented 3 years ago

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


commit: 84d7cb58a5b088fb347ff46792c3b949551aed6c buildURL: Build Status, Sponge status: failed

Test output
Traceback (most recent call last):
  File "/workspace/healthcare/api-client/v1/dicom/dicom_stores_test.py", line 59, in test_dataset
    create()
  File "/workspace/healthcare/api-client/v1/dicom/.nox/py-3-10/lib/python3.10/site-packages/backoff/_sync.py", line 94, in retry
    ret = target(*args, **kwargs)
  File "/workspace/healthcare/api-client/v1/dicom/dicom_stores_test.py", line 49, in create
    datasets.create_dataset(project_id, location, dataset_id)
  File "/workspace/healthcare/api-client/v1/dicom/../datasets/datasets.py", line 47, in create_dataset
    response = request.execute()
  File "/workspace/healthcare/api-client/v1/dicom/.nox/py-3-10/lib/python3.10/site-packages/googleapiclient/_helpers.py", line 131, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/workspace/healthcare/api-client/v1/dicom/.nox/py-3-10/lib/python3.10/site-packages/googleapiclient/http.py", line 937, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: 
flaky-bot[bot] commented 3 years ago

Looks like this issue is flaky. :worried:

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

A human should fix and close this.


commit: 4e8bbf405fcd41720f130cbcb6796e71b2a32b33 buildURL: Build Status, Sponge status: failed

Test output
Traceback (most recent call last):
  File "/workspace/healthcare/api-client/v1/dicom/dicom_stores_test.py", line 59, in test_dataset
    create()
  File "/workspace/healthcare/api-client/v1/dicom/.nox/py-3-10/lib/python3.10/site-packages/backoff/_sync.py", line 94, in retry
    ret = target(*args, **kwargs)
  File "/workspace/healthcare/api-client/v1/dicom/dicom_stores_test.py", line 49, in create
    datasets.create_dataset(project_id, location, dataset_id)
  File "/workspace/healthcare/api-client/v1/dicom/../datasets/datasets.py", line 47, in create_dataset
    response = request.execute()
  File "/workspace/healthcare/api-client/v1/dicom/.nox/py-3-10/lib/python3.10/site-packages/googleapiclient/_helpers.py", line 131, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/workspace/healthcare/api-client/v1/dicom/.nox/py-3-10/lib/python3.10/site-packages/googleapiclient/http.py", line 937, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: 
leahecole commented 3 years ago

I enabled the Healthcare API in the new test project

flaky-bot[bot] commented 3 years ago

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

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


commit: 767d63113bf3e7f2b43047bbc594ec22c4178d33 buildURL: Build Status, Sponge status: failed

Test output
Traceback (most recent call last):
  File "/workspace/healthcare/api-client/v1/dicom/dicom_stores_test.py", line 215, in test_export_dicom_instance
    dicom_stores.export_dicom_instance(
  File "/workspace/healthcare/api-client/v1/dicom/dicom_stores.py", line 270, in export_dicom_instance
    response = request.execute()
  File "/workspace/healthcare/api-client/v1/dicom/.nox/py-3-10/lib/python3.10/site-packages/googleapiclient/_helpers.py", line 131, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/workspace/healthcare/api-client/v1/dicom/.nox/py-3-10/lib/python3.10/site-packages/googleapiclient/http.py", line 937, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: 
noerog commented 3 years ago

@leahecole It looks like some tests are failing with 403 errors and can't access resources like the shared GCS bucket. Is there a way for me to fix this?

busunkim96 commented 3 years ago

@noerog It looks like there was another IAM permission that was needed. I just gave the 3.10 project's Cloud Healthcare Service Agent storage permissions to python-docs-samples-tests.

Traceback (most recent call last):
  File "/workspace/healthcare/api-client/v1/fhir/fhir_stores_test.py", line 244, in test_import_fhir_store_gcs
    fhir_stores.import_fhir_resources(
  File "/workspace/healthcare/api-client/v1/fhir/fhir_stores.py", line 358, in import_fhir_resources
    response = request.execute()
  File "/workspace/healthcare/api-client/v1/fhir/.nox/py-3-10/lib/python3.10/site-packages/googleapiclient/_helpers.py", line 131, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/workspace/healthcare/api-client/v1/fhir/.nox/py-3-10/lib/python3.10/site-packages/googleapiclient/http.py", line 937, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://healthcare.googleapis.com/v1/projects/python-docs-samples-tests-310/locations/us-central1/datasets/test_dataset_9d3ffeee-a06d-41e4-b48a-5e5f79df2eee/fhirStores/test_fhir_store-d6c94a06-309e-46fe-b0a4-e93c28d14249:import?alt=json returned "Cloud Healthcare Service Agent doesn't have all required permissions [storage.objects.list] on resource "python-docs-samples-tests" (or the resource may not exist)". Details: "Cloud Healthcare Service Agent doesn't have all requir
busunkim96 commented 3 years ago

I gave the python 3.10 project's healthcare service agent permission to the python-docs-samples-tests storage bucket. The tests are passing now: https://github.com/GoogleCloudPlatform/python-docs-samples/pull/6911

noerog commented 3 years ago

Thank you!