You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/12/08 23:27:00 UTC

[jira] [Commented] (BEAM-3284) Python SDK, dataflow runner, the method modify_job_status is calling the wrong API endpoint

    [ https://issues.apache.org/jira/browse/BEAM-3284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284407#comment-16284407 ] 

ASF GitHub Bot commented on BEAM-3284:
--------------------------------------

aaltay opened a new pull request #4240: [BEAM-3284] Use the correct endpoint for modify job state
URL: https://github.com/apache/beam/pull/4240
 
 
   R: @udim 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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)