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

How can I view the ids of failed tasks?

When using Google Cloud batch, I see that several tasks have failed. How can I view the ids of those tasks, so I can look through the logs and determine what caused them to fail?

Solved Solved
2 2 360
1 ACCEPTED SOLUTION

Ok, this command sort of worked:

 

 

gcloud beta batch tasks list --job my-job --project my-project --location us-central1 | grep FAIL

 

 

But

1. It outputs 2 rows, but I have 4 failed tasks

2. It outputs the warning "ERROR: (gcloud.beta.batch.tasks.list) INVALID_ARGUMENT: pagesize field is invalid. mismatching token page size error: request page size (0) != token page size (500)"

Edit: I see what is going on. For some reason, this is only printing out the first 501 tasks. I needed to do:

 

gcloud beta batch tasks list --job my-job --project my-project --location us-central1 --page-size 500

 

View solution in original post