Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GAPIC-generated system tests broken on Kokoro #6157

Closed
tseaver opened this issue Oct 3, 2018 · 1 comment
Closed

GAPIC-generated system tests broken on Kokoro #6157

tseaver opened this issue Oct 3, 2018 · 1 comment
Assignees
Labels
api: bigquerydatatransfer Issues related to the BigQuery Data Transfer Service API. api: clouderrorreporting Issues related to the Error Reporting API. api: cloudiot Issues related to the IoT Core API. api: cloudtrace Issues related to the Cloud Trace API. api: container Issues related to the Kubernetes Engine API API. api: dataproc Issues related to the Dataproc API. api: monitoring Issues related to the Cloud Monitoring API. api: pubsub Issues related to the Pub/Sub API. codegen testing type: process A process-related concern. May include testing, release, or the like.

Comments

@tseaver
Copy link
Contributor

tseaver commented Oct 3, 2018

From: https://source.cloud.google.com/results/invocations/3b9800e0-277d-4e82-bf21-bc7b72d2eef3/targets/cloud-devrel%2Fclient-libraries%2Fgoogle-cloud-python%2Fpresubmit%2Ferror_reporting/log

=================================== FAILURES ===================================
____________ TestSystemReportErrorsService.test_report_error_event _____________

self = <test_system_report_errors_service_v1beta1.TestSystemReportErrorsService object at 0x7f7e164d7cf8>

    def test_report_error_event(self):
>       project_id = os.environ['PROJECT_ID']

tests/system/gapic/v1beta1/test_system_report_errors_service_v1beta1.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = environ({'SYSTEMROOT': '', 'KOKORO_GFILE_DIR': '/tmpfs/src/gfile', 'HOSTNAME': 'kokoro-gcp-ubuntu-prod-1154164688', 'K...eta1/test_system_report_errors_service_v1beta1.py::TestSystemReportErrorsService::()::test_report_error_event (call)'})
key = 'PROJECT_ID'

    def __getitem__(self, key):
        try:
            value = self._data[self.encodekey(key)]
        except KeyError:
            # raise KeyError with the original key value
>           raise KeyError(key) from None
E           KeyError: 'PROJECT_ID'

The following codegen-derived system tests files use os.environ['PROJECT_ID']:

  • bigquery_datatransfer/tests/system/gapic/v1/test_system_data_transfer_service_v1.py
  • container/tests/system/gapic/v1/test_system_cluster_manager_v1.py
  • dataproc/tests/system/gapic/v1/test_system_cluster_controller_v1.py
  • dataproc/tests/system/gapic/v1beta2/test_system_cluster_controller_v1beta2.py
  • error_reporting/tests/system/gapic/v1beta1/test_system_report_errors_service_v1beta1.py
  • iot/tests/system/gapic/v1/test_system_device_manager_v1.py
  • monitoring/tests/system/gapic/v3/test_system_metric_service_v3.py
  • pubsub/tests/system/gapic/v1/test_system_publisher_v1.py
  • trace/tests/system/gapic/v1/test_system_trace_service_v1.py
  • trace/tests/system/gapic/v2/test_system_trace_service_v2.py

The "standard" environment variable for such purposes is GOOGLE_CLOUD_PROJECT. It looks to me like we used to have PROJECT_ID defined as a CircleCI environment variable: we should likely add it for Kokoro too.

@tseaver tseaver added testing api: pubsub Issues related to the Pub/Sub API. api: monitoring Issues related to the Cloud Monitoring API. api: clouderrorreporting Issues related to the Error Reporting API. api: cloudtrace Issues related to the Cloud Trace API. api: dataproc Issues related to the Dataproc API. api: container Issues related to the Kubernetes Engine API API. api: bigquerydatatransfer Issues related to the BigQuery Data Transfer Service API. api: cloudiot Issues related to the IoT Core API. codegen labels Oct 3, 2018
@tseaver tseaver added the type: process A process-related concern. May include testing, release, or the like. label Oct 4, 2018
@theacodes
Copy link
Contributor

@busunkim96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerydatatransfer Issues related to the BigQuery Data Transfer Service API. api: clouderrorreporting Issues related to the Error Reporting API. api: cloudiot Issues related to the IoT Core API. api: cloudtrace Issues related to the Cloud Trace API. api: container Issues related to the Kubernetes Engine API API. api: dataproc Issues related to the Dataproc API. api: monitoring Issues related to the Cloud Monitoring API. api: pubsub Issues related to the Pub/Sub API. codegen testing type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

No branches or pull requests

4 participants