Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: txn insights details fixes #96832

Merged
merged 3 commits into from
Feb 9, 2023
Merged

Conversation

xinhaoz
Copy link
Member

@xinhaoz xinhaoz commented Feb 8, 2023

See individual commits.

image

image

@xinhaoz xinhaoz requested a review from a team February 8, 2023 23:43
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@xinhaoz xinhaoz requested a review from a team February 8, 2023 23:43
This commit fixes a bug in when we show the error message
due to cluster upgrade in the UI. The bug caused the message
to show more frequently than desired.

Epic: none

Release note: None
Copy link
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 2 of 2 files at r1, 3 of 4 files at r2, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @xinhaoz)


pkg/ui/workspaces/cluster-ui/src/insights/workloadInsightDetails/transactionInsightDetails.tsx line 151 at r2 (raw file):

          <Tabs.TabPane tab="Overview" key={TabKeysEnum.OVERVIEW}>
            <TransactionInsightDetailsOverviewTab
              isLoading={txnDetails == null && fetches.current === 0}

if you're trying 3 times, should this be txnDetails == null && fetches.current < MAX_REQ_ATTEMPTS ?

@xinhaoz xinhaoz force-pushed the fix-error-msg branch 2 times, most recently from 53a0132 to 4194e9a Compare February 9, 2023 16:54
@xinhaoz
Copy link
Member Author

xinhaoz commented Feb 9, 2023

pkg/ui/workspaces/cluster-ui/src/insights/workloadInsightDetails/transactionInsightDetails.tsx line 151 at r2 (raw file):

Previously, maryliag (Marylia Gutierrez) wrote…

if you're trying 3 times, should this be txnDetails == null && fetches.current < MAX_REQ_ATTEMPTS ?

Ah yes, nice catch. Fixed!

Copy link
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.

:lgtm:

Reviewed 1 of 1 files at r3, 1 of 1 files at r4, 4 of 4 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @xinhaoz)

Previously, attempts to fetch missing txn insights details
was unbounded. This could happen in the case where the txn
insight is not found in the server. Instead of retrying until
we have complete information, we now limit the number of attempts
to fetch txn insight details to 3 per page load. In addition,
this commit fixes the case where a requested txn insight that
isn't found in the server would show the loading spinner forever.

Epic: none

Release note (ui change): Txn insights that were not found will
display a message `Insight not found`.
The txn details api was missing a null check when reading the
results of contention information, which lead to the showing of
an error when we should just not show any contention details.

Epic: none

Release note: None
@xinhaoz
Copy link
Member Author

xinhaoz commented Feb 9, 2023

TFTR!
bors r=maryliag

@craig
Copy link
Contributor

craig bot commented Feb 9, 2023

Build succeeded:

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