Skip to content

Batch web UI feature request: Tasks tab #85

@OlegAlexanderLowes

Description

@OlegAlexanderLowes

Hello and thank you for creating Google Cloud Batch.

Problem statement

First, it's currently impossible to view the task list and the state of each task in the web UI. We can only see how many tasks are in each state. As a workaround, it's possible to see the task list with this command:

$ gcloud batch tasks list --job projects/#########/locations/us-central1/jobs/job-0015 --sort-by ~STATE
NAME                                                                                               STATE
projects/#########/locations/us-central1/jobs/job-0015/taskGroups/group0/tasks/0  SUCCEEDED
projects/#########/locations/us-central1/jobs/job-0015/taskGroups/group0/tasks/1  SUCCEEDED
projects/#########/locations/us-central1/jobs/job-0015/taskGroups/group0/tasks/2  FAILED

Second, it's currently cumbersome to view the log of a particular task in the web UI. Here's one way to do it:

  1. Go to the Logs tab.
  2. Expand a log line of an arbitrary task.
  3. Expand the labels object
  4. Copy the task_id field and value.
  5. In the filter bar, type labels. and paste the task_id field and value so the filter looks similar to this: labels.task_id: "job##########-group0-1".
  6. Press Enter to apply the filter which will now show the log only from that task.
  7. Click the View in Logs Explorer button which will take you to the Logs Explorer.
  8. If you want to view the log from a different task, change the task index after group0-. For example, labels.task_id: "job##########-group0-2".
  9. Click Run Query to see the log from this other task.

As a workaround, we can use this command to see the tail of the log for a specific task:

$ gcloud logging read 'timestamp<="2025-07-04T03:02:07.932Z"  labels.task_id="job##############-group0-0"' --limit=30
 --format='value(textPayload)' | tac
2025-07-04 01:50:37,553 - Last 
2025-07-04 01:50:37,558 - few
2025-07-04 01:50:37,559 - log
2025-07-04 01:50:37,560 - lines

But to use this command, we first need to grab the job uid from either the web UI or the gcloud batch jobs submit/describe command and we need to supply a timestamp.

Proposed feature

In addition to the Details, Events, and Logs tabs, there can be a Tasks tab. In this tab, there can be a table/list of tasks with the following fields: Task ID and/or BATCH_TASK_INDEX, State, a link to the log for this task. It should be possible to sort the list by State. Clicking on the log link can open either the Logs tab with the correct filter or the Logs Explorer with the correct query for this task.

Thank you for your consideration!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions