Support for locations in the launch_template method #25
Comments
Bump, I’m dealing with the same problem |
We've identified similar issues in other repos and have escalated this to the API service team since it's not a language-specific library issue. Here are the related issues:
Marking this as a P1 bug w/ |
It's been abandoned for about two months now, when will it be addressed? |
I couldn't find an existing issue in the Google Issue Tracker so I created one here. I suggest starring this issue to anyone else that runs across this problem, hopefully it will get some attention from Google soon. |
Hi guys meanwhile you could use the
Just a solution to keep going until someone fix it. |
@jcarrizobrass 's answer is good but I need to work a bit on performances and google-api-python-client is a 50MB library... v1b3/projects/{projectId}/locations/{location}/templates:launch additionally to the current: As a fix, could this endpoint be exposed? Currently my fix is to call v1b3/projects/{projectId}/locations/{location}/templates:launch API directly and it would be great if I could throw away this code to use your pretty-looking and lightweight client. |
For those interested in a quick copy-paste solution, here is a workaround without using the 50MB google-api-python-client. Calling from a Cloud function with the dependency: import google
from google.api_core.retry import Retry
from google.cloud import dataflow_v1beta3
from google.auth.transport.requests import AuthorizedSession
dataflow_client = dataflow_v1beta3.TemplatesServiceClient()
credentials, project_id = google.auth.default()
location = "your-project-location"
http = AuthorizedSession(credentials)
http.mount("https://", HTTPAdapter(max_retries=Retry()))
http.post(
f"https://{dataflow_client.DEFAULT_ENDPOINT}/v1b3/projects/{project_id}/locations/{location}/templates:launch",
params={"gcsPath": dataflow_template_path},
json=body,
) |
The fix has been merged on PR googleapis/gapic-generator-python#1284 and it should be available on release 0.65.2 or later. I'm closing this, but please re-open if the issue still persists. |
Environment details
Python 3.8.11
pip 21.0.1
google-cloud-dataflow-client
version:Version: 0.1.2
Steps to reproduce
asia-northeast1
as the location in launch_template, the error occurs.Code example
Stack trace
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
The text was updated successfully, but these errors were encountered: