Skip to content

release-21.2: ui/db-console: surface more job metrics around reverting and retrying in the DBConsole Jobs Overview page#73624

Merged
jocrl merged 1 commit intocockroachdb:release-21.2from
jocrl:backport21.2-72291
Dec 10, 2021
Merged

release-21.2: ui/db-console: surface more job metrics around reverting and retrying in the DBConsole Jobs Overview page#73624
jocrl merged 1 commit intocockroachdb:release-21.2from
jocrl:backport21.2-72291

Conversation

@jocrl
Copy link
Copy Markdown
Contributor

@jocrl jocrl commented Dec 8, 2021

Backport 1/1 commits from #72291.

/cc @cockroachdb/release


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.

Release justification: Category 4, UI change

Jobs table:
image

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:
image

@jocrl jocrl requested a review from a team as a code owner December 8, 2021 21:38
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Dec 8, 2021

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Patches should only be created for serious issues or test-only changes.
  • Patches should not break backwards-compatibility.
  • Patches should change as little code as possible.
  • Patches should not change on-disk formats or node communication protocols.
  • Patches should not add new functionality.
  • Patches must not add, edit, or otherwise modify cluster versions; or add version gates.
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters.
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.

Add a brief release justification to the body of your PR to justify this backport.

Some other things to consider:

  • What did we do to ensure that a user that doesn’t know & care about this backport, has no idea that it happened?
  • Will this work in a cluster of mixed patch versions? Did we test that?
  • If a user upgrades a patch version, uses this feature, and then downgrades, what happens?

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 19 of 21 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @jocrl and @maryliag)


pkg/server/BUILD.bazel, line 268 at r1 (raw file):

=======
    size = "enormous",
>>>>>>> f0d0467c28 (ui/db-console: surface more job metrics around reverting and retrying in the)

looks like you missed this conflict :)

@jocrl jocrl force-pushed the backport21.2-72291 branch from 9550bdd to 255c6a6 Compare December 9, 2021 15:35
@jocrl
Copy link
Copy Markdown
Contributor Author

jocrl commented Dec 9, 2021


pkg/server/BUILD.bazel, line 268 at r1 (raw file):

Previously, maryliag (Marylia Gutierrez) wrote…

looks like you missed this conflict :)

Done; thank you!

@jocrl jocrl removed the request for review from a team December 9, 2021 17:11
… in the

DBConsole Jobs Overview page

Fixes cockroachdb#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`.
@jocrl jocrl force-pushed the backport21.2-72291 branch from 255c6a6 to b826eab Compare December 10, 2021 17:11
@jocrl jocrl merged commit bb7c267 into cockroachdb:release-21.2 Dec 10, 2021
jocrl added a commit to jocrl/cockroach that referenced this pull request Mar 7, 2022
This commit fixes the stray parenthesis at the end of the duration time for a
succeeded job. The parenthesis had been introduced in
cockroachdb#76691 and the 21.2 backport
cockroachdb#73624.

Release note (ui): Remove stray parenthesis at the end of the duration time for
a succeeded job. It had been accidentally introduced to unreleased master and a
21.2 backport.

Release justification: Category 2, UI bug fix
jocrl added a commit to jocrl/cockroach that referenced this pull request Mar 7, 2022
Addresses  cockroachdb#77440.

This commit fixes the stray parenthesis at the end of the duration time for a
succeeded job. The parenthesis had been introduced in
cockroachdb#76691 and the 21.2 backport
cockroachdb#73624.

Release note (ui): Remove stray parenthesis at the end of the duration time for
a succeeded job. It had been accidentally introduced to unreleased master and a
21.2 backport.

Release justification: Category 2, UI bug fix
craig bot pushed a commit that referenced this pull request Mar 7, 2022
77208: sql: update test that was fooling itself r=ajwerner a=ajwerner

I have no clue what is going on in #76843 but this test was fooling itself
regarding the existence of separate connections.

Release justification: non-production code changes

Release note: None

77220: sql/contention/txnidcache: reuse blocks in list, account for space r=maryliag,ajwerner a=ajwerner

This change does two things to the txnidcache:
1) It accounts for the space used by the fifo eviction list. Previously
   we'd use more than double the intended space. We should probably also
   subtrace out the size of the buffers we're currently filling and the
   channel we use to communicate them, but I'll leave that for later.
2) It stops trying to compact the blocks. Compacting the blocks ends up
   being a good deal of overhead because we have to copy across every
   single message. Instead we can just append the block directly to the
   list. This does have the hazard of wasting a lot of space when the
   blocks are sparse. However, if the blocks are sparse, we know that the
   throughput is low, so it's fine.

Resolves #76738

Release justification: bug fixes and low-risk updates to new functionality

Release note: None

77363: sql/delegate: avoid extra string->int parsing r=otan a=rafiss

Release justification: low risk improvement
Release note: None

77438: ui: Remove stray parenthesis in Jobs page r=jocrl a=jocrl

Addresses #77440.

This commit fixes the stray parenthesis at the end of the duration time for a
succeeded job. The parenthesis had been introduced in
#76691 and the 21.2 backport
#73624.

Before:
![image](https://user-images.githubusercontent.com/91907326/157065776-456c8f7d-1958-4192-b38d-dcb40432cf9d.png)

After:
![image](https://user-images.githubusercontent.com/91907326/157065785-e3f2db6a-67d1-4ae3-87cb-df71dccf0e5f.png)


Release note (ui): Remove stray parenthesis at the end of the duration time for
a succeeded job. It had been accidentally introduced to unreleased master and a
21.2 backport.

Release justification: Category 2, UI bug fix

Co-authored-by: Andrew Werner <awerner32@gmail.com>
Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Co-authored-by: Josephine Lee <josephine@cockroachlabs.com>
jocrl added a commit to jocrl/cockroach that referenced this pull request Mar 7, 2022
Addresses  cockroachdb#77440.

This commit fixes the stray parenthesis at the end of the duration time for a
succeeded job. The parenthesis had been introduced in
cockroachdb#76691 and the 21.2 backport
cockroachdb#73624.

Release note (ui): Remove stray parenthesis at the end of the duration time for
a succeeded job. It had been accidentally introduced to unreleased master and a
21.2 backport.

Release justification: Category 2, UI bug fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants