3

I have to wait for a job to start running before I can cancel it. Is there a way to cancel the job early? Why can I not cancel a job in SETUP_DONE?

Cancelling the job errors with FAILED_PRECONDITION: Cannot cancel jobId 'x' in project 'y' in state: 'SETUP_DONE'; cancellable states: '[PENDING, RUNNING]'

Deleting the job also errors with FAILED_PRECONDITION: Cannot delete non-terminal jobId 'x' in project 'y'; current state: 'SETUP_DONE'

This thread on GitHub raises the same question.

stefanQ
  • 31
  • 2
  • I'm afraid this is not possible. Can you consider adding retry in your cancel logic? Or consider deleting the cluster. – Dagang Oct 16 '22 at 02:12
  • Thanks for replying. I went with retry logic. Why is it not possible? It's not obvious to me. – stefanQ Oct 17 '22 at 15:12
  • Deleting the cluster isn't a good option. For example, other jobs might be running that we don't want to cancel. – user2682459 Oct 17 '22 at 15:19

0 Answers0