Skip to content

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

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
jocrl:jobs-overview-improvements
Dec 8, 2021
Merged

ui/db-console: surface more job metrics around reverting and retrying in the DBConsole Jobs Overview page#72291
craig[bot] merged 1 commit intocockroachdb:masterfrom
jocrl:jobs-overview-improvements

Conversation

@jocrl
Copy link
Copy Markdown
Contributor

@jocrl jocrl commented Nov 1, 2021

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:
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 added the do-not-merge bors won't merge a PR with this label. label Nov 1, 2021
@jocrl jocrl requested review from a team and ajwerner November 1, 2021 16:15
@jocrl jocrl requested a review from a team as a code owner November 1, 2021 16:15
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@jocrl
Copy link
Copy Markdown
Contributor Author

jocrl commented Nov 1, 2021

Some side notes:

1. Execution errors field (@ajwerner and @vy-ton)
The execution_errors column was added in #44594, but I didn't surface it in the UI or add it to the endpoint because it didn't appear in the mockup. I also wasn't sure how it plays with the existing error column in crdb_internal.jobs. Marylia helped me discover #69170 for this.

2. Translating statuses (@vy-ton and @kevin-v-ngo)
This PR translates the running and reverting statuses to retry-running and retry-reverting #68179 (comment). Separately, I see the decision in #71963 (comment) to not translate the statuses in that issue since it might be confusing. Just want to sync up whether the status translation for the retry statuses in this issue is okay? For this issue it adds more information instead of hiding information, but the exact value returned by the endpoint is different from the value in the crdb_internal.jobs table.

3. Roachprod reproduction (@Annebirzin and @kevin-v-ngo)
edit: Marylia clarified with me that this isn't a problem 🙂
My understanding is that you usually manually test features in roachprod. In @ajwerner's words on slack regarding the retrying state, "you’re butting up against a real rough edge in that it’s not easy to actually make those states happen in practice".

I'm personally not even sure how to induce a non-retrying running or reverting state in db console. Andrew provided a code snippet that I'll put in the next comment for inducing the retrying states in development where you can write as root. Not sure if you could use that snippet for testing in roachprod?

4. Storybook (@Annebirzin and @kevin-v-ngo)
I'm not sure if you have the dev environment built? If you have the db console front end built and would like to poke around storybook, you can launch it with

# from the crdb repo
cd pkg/ui/workspaces/db-console
yarn storybook

Happy to help with any installation trouble!

5. Minor retry badge UI stuff (@Annebirzin)
For retry-running, I've put the retry badge on a new line because I couldn't fit it in the same line while maintaining consistency with other badge styles or making the column wider. A similar thing happens with retry-reverting, the two badges end up in different lines exepct in the widest of windows. Other than in the Jobs overview page, the same badge style is also used in other places like the nodes overview and the statements page.

The separate line does make the row taller than other normal rows. Not sure if you would prefer to break with other badge styles, and have a squished retry badge that's smaller than the others?

@jocrl
Copy link
Copy Markdown
Contributor Author

jocrl commented Nov 1, 2021

Run ./cockroach demo --log-dir logs --with-load --insecure --multitenant=false

The snippet Andrew provided to write to jobs table as root to create retrying jobs:

create table foo ();
create table bar ();
drop table foo;
drop table bar;
select pg_sleep(1);
  WITH pl AS (
            SELECT id,
                   crdb_internal.pb_to_json(
                    'cockroach.sql.jobs.jobspb.Payload',
                    payload
                   ) AS pl
              FROM system.jobs
             WHERE id
                   IN (
                      SELECT job_id
                        FROM crdb_internal.jobs
                       WHERE job_type = 'SCHEMA CHANGE GC'
                             AND description
                              LIKE 'GC for DROP TABLE%'
                    )
          ),
       updated AS (
                SELECT id, json_remove_path(
                        json_remove_path(pl, ARRAY['finishedMicros']),
                        ARRAY['finalResumeError']
                       ) AS pl
                  FROM pl
               ),
       to_insert AS (
                  SELECT id, 
                          crdb_internal.json_to_pb(
                            'cockroach.sql.jobs.jobspb.Payload',
                            pl
                          ) AS encoded_pl, pl
                    FROM updated
                 )
UPDATE system.jobs
   SET status = IF(pl->>'description' LIKE '%foo%', 'reverting', 'running'),
       payload = encoded_pl,
       claim_session_id = NULL,
       claim_instance_id = NULL,
       last_run = now(),
       num_runs = 10
  FROM to_insert
 WHERE jobs.id = to_insert.id;

@jocrl jocrl marked this pull request as draft November 1, 2021 19:57
@jocrl jocrl removed the do-not-merge bors won't merge a PR with this label. label Nov 1, 2021
@jocrl jocrl changed the title [do-not-merge] ui/db-console: surface more job metrics around reverting and retrying in the DBConsole Jobs Overview page ui/db-console: surface more job metrics around reverting and retrying in the DBConsole Jobs Overview page Nov 1, 2021
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 11 of 14 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @jocrl)


pkg/ui/workspaces/db-console/src/views/jobs/jobStatus.tsx, line 71 at r1 (raw file):

          />
          <div className="jobs-table__align-progress-bar">
            {jobIsRetrying && <RetryingStatusBadge />}

you probably want the jib is running check for the div component, not just the div content. No need to create this div if it will be empty

{jobIsRetrying && (<div className....)}

Copy link
Copy Markdown

@matthewtodd matthewtodd left a comment

Choose a reason for hiding this comment

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

This looks nice! I'm not sure what to do about 2., but I've done something like it before, flattening a couple of dimensions into one for display purposes. In that context, it became a little icky to work with, but I don't know if it will here, since we're just building a read-only view. IIUC, we do have enough fields in the API response to calculate the "retrying" answer on the client side, yes? (Except we would be depending on the browser's sense of time, which isn't great.)

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @jocrl)

Copy link
Copy Markdown
Contributor

@Azhng Azhng left a comment

Choose a reason for hiding this comment

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

Just trying to wrap my head around the job CTE query here, is my understanding correct that this CTE finds the schema change jobs on foo table and set its status to reverting?

Few things that I don't quite understand here:

  1. Why do we need to remove finishedMicros and finalResumeError field?
  2. if a job is running at the reverting stage, why do we need to set the claim_{session, instance}_id to NULL ?

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @jocrl)


pkg/server/admin.go, line 1855 at r1 (raw file):

             case when ` + retryRunningCondition + `then 'retry-running' 
             when ` + retryRevertingCondition + ` then 'retry-reverting' 
             else status end as status,

super minor nit: is it possible we can format the case operator as

case 
  when ... then ...
  when ... then ...
  else ...
end 

for better readability ?


pkg/server/admin.go, line 2735 at r1 (raw file):

		*d = &val

	case *[]string:

quick question, which column has the destination type *[]string ?


pkg/ui/workspaces/db-console/src/views/jobs/duration.tsx, line 37 at r1 (raw file):

    if (isRunning(job.status)) {
      const fractionCompleted = job.fraction_completed;
      if (fractionCompleted > 0) {

I think we have other long running jobs like CDC that does not terminate. In that case I think fraction_completed is omitted and it returns a high_water timestamp instead.
So what would happen here if we have a CDC job ?


pkg/ui/workspaces/db-console/src/views/jobs/JobTable.stories.tsx, line 1 at r1 (raw file):

// Copyright 2020 The Cockroach Authors.

nit: s/2020/2021/

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.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @jocrl)


-- commits, line 26 at r1:
link the issue being addressed, with a Fixes #issuenumber or Partially Adresses #issuenumber

@jocrl jocrl force-pushed the jobs-overview-improvements branch from 3e51673 to 026bc64 Compare November 4, 2021 18:10
Copy link
Copy Markdown
Contributor Author

@jocrl jocrl left a comment

Choose a reason for hiding this comment

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

@matthewtodd thanks, good to know there's precedent for that!

IIUC, we do have enough fields in the API response to calculate the "retrying" answer on the client side, yes? (Except we would be depending on the browser's sense of time, which isn't great.)

Yup, that's correct. The downside is that the filtering is done back end (https://github.com/cockroachdb/cockroach/pull/72291/files#diff-1402bca7aa2ae9e5b623ab3d1e93d918e0f8d652c689c42d644e46611151c9f6R1853). So there are two places where the logic is used,

  1. when deciding what badge to show
  2. when deciding whether a job filtered by query params should be part of the result

We have the fields, but independently calculating 1. on the client side would mean that the definition of "retrying" would be duplicated in the front end and back end code, and risk getting out of sync.

@Azhng so... Andrew Werner gave me the job CTE query; I don't understand it xD. This was the message if you would like to ask him? https://cockroachlabs.slack.com/archives/C02DSDS9TM1/p1635345519023200

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @Azhng, and @maryliag)


-- commits, line 26 at r1:

Previously, maryliag (Marylia Gutierrez) wrote…

link the issue being addressed, with a Fixes #issuenumber or Partially Adresses #issuenumber

Done.


pkg/server/admin.go, line 1855 at r1 (raw file):

Previously, Azhng (Archer Zhang) wrote…

super minor nit: is it possible we can format the case operator as

case 
  when ... then ...
  when ... then ...
  else ...
end 

for better readability ?

Done.


pkg/server/admin.go, line 2735 at r1 (raw file):

Previously, Azhng (Archer Zhang) wrote…

quick question, which column has the destination type *[]string ?

Thanks for the catch. This should've been for a different issue, adding execution_errors which is *[]string. I've removed this.


pkg/ui/workspaces/db-console/src/views/jobs/duration.tsx, line 37 at r1 (raw file):

Previously, Azhng (Archer Zhang) wrote…

I think we have other long running jobs like CDC that does not terminate. In that case I think fraction_completed is omitted and it returns a high_water timestamp instead.
So what would happen here if we have a CDC job ?

The pre-existing code has it that if there is a highwater time stamp, it doesn't show a status badge at all (doesn't go into jobStatus.tsx and doesn't show duration). https://github.com/cockroachdb/cockroach/blob/master/pkg/ui/workspaces/db-console/src/views/jobs/jobStatusCell.tsx#L28

It looks like this:
image.png


pkg/ui/workspaces/db-console/src/views/jobs/JobTable.stories.tsx, line 1 at r1 (raw file):

Previously, Azhng (Archer Zhang) wrote…

nit: s/2020/2021/

done


pkg/ui/workspaces/db-console/src/views/jobs/jobStatus.tsx, line 71 at r1 (raw file):

Previously, maryliag (Marylia Gutierrez) wrote…

you probably want the jib is running check for the div component, not just the div content. No need to create this div if it will be empty

{jobIsRetrying && (<div className....)}

Done.

Copy link
Copy Markdown
Contributor Author

@jocrl jocrl left a comment

Choose a reason for hiding this comment

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

@Azhng it's possible that he was just trying to make other unnecessary fields more realistic

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @Azhng, and @maryliag)

@Annebirzin
Copy link
Copy Markdown

Annebirzin commented Nov 4, 2021

@jocrl Looking good! I had one suggestion for better alignment of the text/badges (Figma link):

  • For in-progress status, can we move the percentage to the right of the progress bar? This way we can left-align the progress bar, timestamp, additional description text, and badges.

Also, I was wondering if we could make a few color tweaks (can break this out in a separate issue if you want)

  • Update the progress bar to our default blue: Hex #0055FF (also called info-3)
  • Update the 'Succeeded' badge colors to match Figma
    • Text: Hex #237300 (also called success-4)
    • Background-fill: Hex #E3F5E0 (also called success-1)

Screen Shot 2021-11-04 at 2 10 48 PM

Copy link
Copy Markdown
Contributor

@Azhng Azhng left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @maryliag)


pkg/server/admin.go, line 2735 at r1 (raw file):

Previously, jocrl (Josephine) wrote…

Thanks for the catch. This should've been for a different issue, adding execution_errors which is *[]string. I've removed this.

👍


pkg/ui/workspaces/db-console/src/views/jobs/duration.tsx, line 37 at r1 (raw file):

Previously, jocrl (Josephine) wrote…

The pre-existing code has it that if there is a highwater time stamp, it doesn't show a status badge at all (doesn't go into jobStatus.tsx and doesn't show duration). https://github.com/cockroachdb/cockroach/blob/master/pkg/ui/workspaces/db-console/src/views/jobs/jobStatusCell.tsx#L28

It looks like this:
image.png

Ah nice, TIL 👍

@jocrl jocrl force-pushed the jobs-overview-improvements branch from 026bc64 to 6bd9bee Compare November 10, 2021 21:56
Copy link
Copy Markdown
Contributor Author

@jocrl jocrl left a comment

Choose a reason for hiding this comment

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

@Annebirzin , how does this look for alignment?
image.png

The color change turns out to be more complicated to do nicely (https://cockroachlabs.slack.com/archives/C0182T8NUH0/p1636579523023600 if anyone is interested in the implementation details). I'll break it into a separate issue!

@cockroachdb/sql-observability I've added tests, made a minor UI change, and made the fixtures prettier. Reviewable also seems to detect changes in full.md in the latest push that I'm not seeing on github; does anyone have an idea what's going on?

@laurenbarker, could I get your review for index.spec.tsx? The test for this PR doesn't require any redux stuff, so I've left out the testHelper.tsx port from this PR and will work on that later.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @maryliag)


pkg/ui/workspaces/db-console/src/views/jobs/index.spec.tsx, line 19 at r3 (raw file):

  allJobsFixture,
  retryRunningJobFixture,
} from "src/views/jobs/jobTable.fixture";

What do people think about sharing these fixtures between storybook and tests?

Pros:

  • The fixture for what a running job looks like already exists, so might as well reuse it. It reduces boilerplate and having to re-specify all the fields in the test
  • Having the storybook fixtures used in test makes it less likely that the storybook fixtures will diverge and break

Cons:

  • It is not obvious that the fixtures are used in both. One might imagine wanting to change the storybook fixture just because, and being surprised that it affects tests

@jocrl jocrl marked this pull request as ready for review November 10, 2021 22:23
@Annebirzin
Copy link
Copy Markdown

@jocrl alignment looks great, thanks for the update!

@jocrl jocrl force-pushed the jobs-overview-improvements branch from 6bd9bee to a6a9776 Compare November 11, 2021 14:45
@jocrl jocrl requested a review from laurenbarker November 11, 2021 14:59
@jocrl jocrl force-pushed the jobs-overview-improvements branch 2 times, most recently from fa7d3d1 to af2515c Compare November 11, 2021 16:21
@maryliag maryliag removed the request for review from a team November 11, 2021 16:24
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 1 of 4 files at r2, 11 of 14 files at r3, 2 of 2 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @jocrl, @laurenbarker, and @maryliag)


pkg/ui/workspaces/db-console/src/views/jobs/index.spec.tsx, line 19 at r3 (raw file):

Previously, jocrl (Josephine) wrote…

What do people think about sharing these fixtures between storybook and tests?

Pros:

  • The fixture for what a running job looks like already exists, so might as well reuse it. It reduces boilerplate and having to re-specify all the fields in the test
  • Having the storybook fixtures used in test makes it less likely that the storybook fixtures will diverge and break

Cons:

  • It is not obvious that the fixtures are used in both. One might imagine wanting to change the storybook fixture just because, and being surprised that it affects tests

I think it makes sense to use the same. If a change is made with storybook in mind and that breaks a test, that's good, because we caught that. The ui and tests should be aligned anyway

Copy link
Copy Markdown
Contributor Author

@jocrl jocrl left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @laurenbarker, and @maryliag)


pkg/ui/workspaces/db-console/src/views/jobs/index.spec.tsx, line 19 at r3 (raw file):

Previously, maryliag (Marylia Gutierrez) wrote…

I think it makes sense to use the same. If a change is made with storybook in mind and that breaks a test, that's good, because we caught that. The ui and tests should be aligned anyway

Mmm, yeah I'm thinking there are two types of "storybook change breaks a test", one which is good to catch and one which we don't care about and could be annoying.

E.g., let's say there's a tooltip that if you hover will show the job description, in this case "automatic SQL Stats compaction". The test is like

// pseudocode
renderTheComponent()
hoverTheComponent()
verifyThatThisTextAppears("automatic SQL Stats compaction")

A storybook change could break verifyThatThisTextAppears in two ways

  1. Something about the new storybook inputs makes it so that the tooltip no longer appears. This is good to catch 😃
  2. The storybook changes the description to "BACKUP DATABASE bank TO 'gs://acme-co-backup/database-bank-2017-03-29-nightly' AS OF SYSTEM TIME '-10s' INCREMENTAL FROM 'gs://acme-co-backup/database-bank-2017-03-27-weekly', 'gs://acme-co-backup/database-bank-2017-03-28-nightly' WITH revision_history", or some other different text, to be able to front end develop on whether the page works with a really long tooltip. The tooltip still works, but the test breaks because the text changes.

So yeah, I think 1) is legit and useful. 2) I'm concerned that it constrains the ability of storybook to be a sandbox and causes flaky test churn

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.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @jocrl, and @laurenbarker)


pkg/ui/workspaces/db-console/src/views/jobs/index.spec.tsx, line 19 at r3 (raw file):

Previously, jocrl (Josephine) wrote…

Mmm, yeah I'm thinking there are two types of "storybook change breaks a test", one which is good to catch and one which we don't care about and could be annoying.

E.g., let's say there's a tooltip that if you hover will show the job description, in this case "automatic SQL Stats compaction". The test is like

// pseudocode
renderTheComponent()
hoverTheComponent()
verifyThatThisTextAppears("automatic SQL Stats compaction")

A storybook change could break verifyThatThisTextAppears in two ways

  1. Something about the new storybook inputs makes it so that the tooltip no longer appears. This is good to catch 😃
  2. The storybook changes the description to "BACKUP DATABASE bank TO 'gs://acme-co-backup/database-bank-2017-03-29-nightly' AS OF SYSTEM TIME '-10s' INCREMENTAL FROM 'gs://acme-co-backup/database-bank-2017-03-27-weekly', 'gs://acme-co-backup/database-bank-2017-03-28-nightly' WITH revision_history", or some other different text, to be able to front end develop on whether the page works with a really long tooltip. The tooltip still works, but the test breaks because the text changes.

So yeah, I think 1) is legit and useful. 2) I'm concerned that it constrains the ability of storybook to be a sandbox and causes flaky test churn

I see, in that case we don't want to create new points of failures for tests. Let keep as is and think for future improvements we can make on this area, but that will not be on the scope of this PR

@jocrl jocrl force-pushed the jobs-overview-improvements branch 2 times, most recently from 2c22b4f to 9883c4d Compare November 11, 2021 22:04
@jocrl
Copy link
Copy Markdown
Contributor Author

jocrl commented Nov 11, 2021

Updated images on description to reflect the latest state

@jocrl
Copy link
Copy Markdown
Contributor Author

jocrl commented Nov 29, 2021

Hi @laurenbarker, friendly bump if I could get your review for index.spec.tsx?
The test for this PR doesn't require any redux stuff, so I've left out the testHelper.tsx port from this PR and will work on that later.

@jocrl jocrl force-pushed the jobs-overview-improvements branch 4 times, most recently from a41047f to e502248 Compare November 30, 2021 15:07
… 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 jobs-overview-improvements branch from e502248 to f0d0467 Compare December 2, 2021 19:12
Copy link
Copy Markdown
Contributor

@laurenbarker laurenbarker left a comment

Choose a reason for hiding this comment

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

Apologize for the delay! I need to setup my notifications for this repo. The test looks good to me, I just had one question about the necessity of pulling out the helper.

My approval is for the test as I didn't review the rest of the PR :)

Reviewed 1 of 14 files at r3.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @jocrl, and @maryliag)


pkg/ui/workspaces/db-console/src/test-utils/tooltip.ts, line 13 at r8 (raw file):

import { expect } from "chai";

export const expectPopperTooltipActivated = () =>

Are you planning on using this in other tests? Based on only this PR is seems like an early optimization.


pkg/ui/workspaces/db-console/src/views/jobs/index.spec.tsx, line 91 at r8 (raw file):

    await waitFor(expectPopperTooltipActivated);
    userEvent.hover(getByText("retrying"));

Glad this works! We've had inconsistent behavior for triggering hover events in tests depending on the tooltip library.

@jocrl
Copy link
Copy Markdown
Contributor Author

jocrl commented Dec 3, 2021


pkg/ui/workspaces/db-console/src/test-utils/tooltip.ts, line 13 at r8 (raw file):

Previously, laurenbarker (Lauren Barker) wrote…

Are you planning on using this in other tests? Based on only this PR is seems like an early optimization.

Not currently planning, but yeah it's an early optimization on the basis that the tooltip is a reusable component. Would you suggest not making that optimization without a current use case?

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.

Great job on this PR! :lgtm:

Can you also add the backport 21.2 label to this? We will want to backport this :)

Reviewed 1 of 14 files at r3, 3 of 4 files at r6, 5 of 8 files at r7, 3 of 3 files at r9, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @laurenbarker)

@jocrl
Copy link
Copy Markdown
Contributor Author

jocrl commented Dec 8, 2021

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 8, 2021

Build succeeded:

@craig craig bot merged commit a7e903b into cockroachdb:master Dec 8, 2021
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Dec 8, 2021

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from f0d0467 to blathers/backport-release-21.2-72291: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 21.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@jocrl
Copy link
Copy Markdown
Contributor Author

jocrl commented Jan 13, 2022

I'm now realizing that this is also

  1. a server change, but I didn't include "server" in the title
  2. an api change, but I didn't include "(api change)" in the release notes, or describe the /jobs endpoint change in the release notes section

@maryliag, should I correct these somehow?

@maryliag
Copy link
Copy Markdown
Contributor

  1. Since this was already merged and backported, it don't think it matters that much
  2. You do have a description of the jobs endpoint change on your release note (with "The status query parameter in the /jobs endpoint now supports the values reverting and retrying."). The point of the release note is to add changes to the Docs, so if there is anything else that should be added, changing just here won't notify the docs team since the issue for this was already created, so you can add any missing info to the issue itself ui/db-console: surface more job metrics around reverting and retrying in the DBConsole Jobs Overview page docs#12535

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.

ui,jobs: improve jobs overview page in DBConsole

7 participants