[
https://issues.apache.org/jira/browse/BEAM-3284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Groh reassigned BEAM-3284:
---------------------------------
Assignee: Ahmet Altay (was: Thomas Groh)
> Python SDK, dataflow runner, the method modify_job_status is calling the
> wrong API endpoint
> -------------------------------------------------------------------------------------------
>
> Key: BEAM-3284
> URL: https://issues.apache.org/jira/browse/BEAM-3284
> Project: Beam
> Issue Type: Bug
> Components: runner-dataflow
> Affects Versions: 2.1.0, 2.2.0
> Reporter: Ron Mahoney
> Assignee: Ahmet Altay
> Priority: Minor
>
> In the Python SDK, for dataflow runner, the method modify_job_status is
> calling the wrong API endpoint. Discovered while trying to cancel a job by
> setting the status to JOB_STATE_CANCELLED, received the following error:
> {noformat}
> WARNING:root:Retry with exponential backoff: waiting for 154.109699453
> seconds before retrying modify_job_state because we caught exception:
> TypecheckError: Type of arg is "<class
> 'apache_beam.runners.dataflow.internal.clients.dataflow.dataflow_v1b3_messages.DataflowProjectsLocationsJobsUpdateRequest'>",
> not "<class
> 'apache_beam.runners.dataflow.internal.clients.dataflow.dataflow_v1b3_messages.DataflowProjectsJobsUpdateRequest'>"
> {noformat}
> The following change fixes this:
> {noformat}
> diff --git a/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
> b/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
> index edac9d7d5..1124ee182 100644
> --- a/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
> +++ b/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
> @@ -512,7 +512,7 @@ class DataflowApplicationClient(object):
> # Other states could only be set by the service.
> return False
> - request = dataflow.DataflowProjectsLocationsJobsUpdateRequest()
> + request = dataflow.DataflowProjectsJobsUpdateRequest()
> request.jobId = job_id
> request.projectId = self.google_cloud_options.project
> request.location = self.google_cloud_options.region
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)