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

Support for locations in the launch_template method #25

@laughingman7743

Description

@laughingman7743

Environment details

  • OS type and version:
  • Python version: Python 3.8.11
  • pip version: pip 21.0.1
  • google-cloud-dataflow-client version: Version: 0.1.2

Steps to reproduce

  1. If I specify asia-northeast1 as the location in launch_template, the error occurs.

Code example

dataflow.TemplatesServiceClient().launch_template( { "project_id": "project" "location": "asia-northeast1", "gcs_path": "gs://", "launch_parameters": LaunchTemplateParameters( { "job_name": "job_name", "parameters": { "foo": "bar" }, "environment": { "service_account_email": "service_account_email", }, } ), } )

Stack trace

Task 'dataflow_dag_run': Exception encountered during task execution! Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 67, in error_remapped_callable return callable_(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/grpc/_channel.py", line 946, in __call__ return _end_unary_response_blocking(state, call, False, None) File "/usr/local/lib/python3.8/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking raise _InactiveRpcError(state) grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:	status = StatusCode.FAILED_PRECONDITION	details = "(1839ef6e6abbd74d): The workflow could not be created, since it was sent to an invalid regional endpoint (asia-northeast1). Please resubmit to a valid Cloud Dataflow regional endpoint. The list of Cloud Dataflow regional endpoints is at https://cloud.google.com/dataflow/docs/concepts/regional-endpoints."	debug_error_string = "{"created":"@1629880821.759668305","description":"Error received from peer ipv4:172.217.175.42:443","file":"src/core/lib/surface/call.cc","file_line":1069,"grpc_message":"(1839ef6e6abbd74d): The workflow could not be created, since it was sent to an invalid regional endpoint (asia-northeast1). Please resubmit to a valid Cloud Dataflow regional endpoint. The list of Cloud Dataflow regional endpoints is at https://cloud.google.com/dataflow/docs/concepts/regional-endpoints.","grpc_status":9}" 

If you want to specify Locations, you will likely need to use an API that supports Locations.
https://cloud.google.com/dataflow/docs/reference/rest/#rest-resource:-v1b3.projects.locations.templates

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: dataflowIssues related to the googleapis/python-dataflow-client API.externalThis issue is blocked on a bug with the actual product.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions