Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Workflow error "Long-running operation returned unexpected response."

Hi, So I'm trying to cancel dataflow jobs using workflow by calling "

googleapis.dataflow.v1b3.projects.locations.jobs.update" and it returns an error "Long-running operation returned unexpected response.". 
Here is my snippet code:

                - stopJob1:
                    call: googleapis.dataflow.v1b3.projects.locations.jobs.update
                    args:
                      jobId: ${dataflow.job.id}
                      location
                      projectId:
                      body:
                        requestedState: JOB_STATE_CANCELLED
                    result: updateResult
                    next: finishStep
 
I actually don't need the result response and the snippet broke after the dataflow has been cancelled, how do i fix this?

Thank you.
1 1 408
1 REPLY 1

Hi @AndriDharma,

Welcome to Google Cloud Community!

Your Dataflow job cancellation workflow using googleapis.dataflow.v1b3.projects.locations.jobs.update encounters an unexpected response error.

Troubleshooting:

  • Review error logs: Check workflow and Dataflow logs for specific details.
  • Handle timeouts: Increase timeout for the call step to allow completion.
  • Network connectivity: Ensure stable network connection to Dataflow service.
  • Temporary service issues: Implement retry logic for transient errors.
  • Asynchronous handling: Remove result field if you don't need it.
  • Alternative methods: Try Dataflow API directly or Google Cloud CLI.

Additional tips:

  • Monitor job state to confirm cancellation.
  • Upgrade relevant libraries and modules.
  • Raise a Google Cloud support ticket.
Top Solution Authors