Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
72291: ui/db-console: surface more job metrics around reverting and retrying in the DBConsole Jobs Overview page r=jocrl a=jocrl Fixes #68179 This commit surfaces the status `reverting`, annotates existing `running` and `reverting` statuses UI with "retrying" where applicable, and adds the "Last Execution Time (UTC)" and "Execution Count" columns to the jobs overview table in db console. "Retrying" is defined as `status IN ('running', 'reverting') AND next_run > now() AND num_runs > 1`. Hovering a retrying status shows the next execution time. The "Status" column was also moved left to the second column. Filtering using the dropdown by `Status: Running` or `Status: Reverting` will include those that are also "retrying". Users can also filter by `Status: Retrying`. The `/jobs` endpoint was modified to add the `last_run`, `next_run`, and `num_runs` fields required for the UI change. Jobs with status `running` or `reverting` and are also "retrying" have their statuses sent as `retry-running` and `retry-reverting` respectively. The endpoint was also modified to support the value `retrying` for the `status` query parameter. This commit also adds a storybook story for the jobs table, which showcases the different possible statuses in permutations of information that could be present for the `running` status. Release note (ui change): The jobs overview table in DBConsole now shows when jobs have the status "reverting", and shows the badge "retrying" when running or reverting jobs are also retrying. Hovering the status for a "retrying" job will show the "Next execution time" in UTC. Two new columns, "Last Execution Time (UTC)" and "Execution Count", were also added to the jobs overview table in DBConsole, and the "Status" column was moved left to the second column in the table. The `status` query parameter in the `/jobs` endpoint now supports the values `reverting` and `retrying`. Jobs table: <img width="1602" alt="image" src="https://user-images.githubusercontent.com/91907326/141374430-bfad72de-aa2d-4cbb-98ef-62ddf5f98f4a.png"> Filter and hover: https://user-images.githubusercontent.com/91907326/141375153-2cf2641a-33a1-4bfb-a900-a187dc5579a1.mov Permutations of running jobs with present/absent combinations of time remaining, running message, or retrying: <img width="979" alt="image" src="https://user-images.githubusercontent.com/91907326/141374527-124a86c0-d10d-451f-b8dc-f745d52fe6d4.png"> Co-authored-by: Josephine Lee <josephine@cockroachlabs.com>
- Loading branch information