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

Tests analytics page V2 #3174

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open

Tests analytics page V2 #3174

wants to merge 46 commits into from

Conversation

RulaKhaled
Copy link
Contributor

Description

We are developing against this. Please open a PR of you wish to push changes to this branch.

Design: https://www.figma.com/design/TcppABudxnslgEmaXm0B9O/GH-2028?node-id=1-2&node-type=CANVAS&t=QWvqJ1kK3WG1pFLS-0

Link to Sample Entry

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@codecov-staging
Copy link

codecov-staging bot commented Sep 10, 2024

Bundle Report

Changes will decrease total bundle size by 371.24kB (-2.1%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system-esm 5.61MB 186.69kB (-3.22%) ⬇️
gazebo-staging-system 5.56MB 184.55kB (-3.21%) ⬇️

Copy link

codecov bot commented Sep 10, 2024

Bundle Report

Changes will decrease total bundle size by 371.24kB (-2.1%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 5.56MB 184.55kB (-3.21%) ⬇️
gazebo-production-system-esm 5.61MB 186.69kB (-3.22%) ⬇️

@codecov-qa
Copy link

codecov-qa bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 95.57823% with 13 lines in your changes missing coverage. Please review.

Project coverage is 99.09%. Comparing base (96f88d8) to head (10a0dde).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../FailedTestsPage/MetricsSection/MetricsSection.tsx 91.86% 7 Missing ⚠️
...ledTestsPage/FailedTestsTable/FailedTestsTable.tsx 92.00% 4 Missing ⚠️
...ailedTestsPage/SelectorSection/SelectorSection.tsx 95.74% 2 Missing ⚠️

Impacted file tree graph

@@           Coverage Diff            @@
##             main    #3174    +/-   ##
========================================
  Coverage   99.09%   99.09%            
========================================
  Files         804      810     +6     
  Lines       14187    14422   +235     
  Branches     4024     4112    +88     
========================================
+ Hits        14058    14291   +233     
- Misses        120      124     +4     
+ Partials        9        7     -2     
Files with missing lines Coverage Δ
...FailedTestsTab/FailedTestsPage/FailedTestsPage.tsx 100.00% <100.00%> (ø)
.../SelectorSection/BranchSelector/BranchSelector.tsx 100.00% <100.00%> (ø)
...stsTab/FailedTestsPage/TableHeader/TableHeader.tsx 100.00% <100.00%> (ø)
...ge/hooks/useFlakeAggregates/useFlakeAggregates.tsx 100.00% <100.00%> (ø)
.../useInfiniteTestResults/useInfiniteTestResults.tsx 100.00% <100.00%> (ø)
...TestResultsAggregates/useTestResultsAggregates.tsx 100.00% <100.00%> (ø)
.../hooks/useTestResultsFlags/useTestResultsFlags.tsx 100.00% <100.00%> (ø)
...TestResultsTestSuites/useTestResultsTestSuites.tsx 100.00% <100.00%> (ø)
...c/pages/RepoPage/FailedTestsTab/FailedTestsTab.tsx 93.10% <ø> (ø)
src/pages/RepoPage/RepoPageTabs.tsx 100.00% <ø> (ø)
... and 6 more

... and 15 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.81% <95.40%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.74% <100.00%> (+<0.01%) ⬆️
UI 99.15% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96f88d8...10a0dde. Read the comment docs.

Copy link

codecov-public-qa bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 95.57823% with 13 lines in your changes missing coverage. Please review.

Project coverage is 99.09%. Comparing base (96f88d8) to head (10a0dde).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff            @@
##             main    #3174    +/-   ##
========================================
  Coverage   99.09%   99.09%            
========================================
  Files         804      810     +6     
  Lines       14187    14422   +235     
  Branches     4017     4105    +88     
========================================
+ Hits        14058    14291   +233     
- Misses        120      124     +4     
+ Partials        9        7     -2     
Files Coverage Δ
...FailedTestsTab/FailedTestsPage/FailedTestsPage.tsx 100.00% <100.00%> (ø)
.../SelectorSection/BranchSelector/BranchSelector.tsx 100.00% <100.00%> (ø)
...stsTab/FailedTestsPage/TableHeader/TableHeader.tsx 100.00% <100.00%> (ø)
...ge/hooks/useFlakeAggregates/useFlakeAggregates.tsx 100.00% <100.00%> (ø)
.../useInfiniteTestResults/useInfiniteTestResults.tsx 100.00% <100.00%> (ø)
...TestResultsAggregates/useTestResultsAggregates.tsx 100.00% <100.00%> (ø)
.../hooks/useTestResultsFlags/useTestResultsFlags.tsx 100.00% <100.00%> (ø)
...TestResultsTestSuites/useTestResultsTestSuites.tsx 100.00% <100.00%> (ø)
...c/pages/RepoPage/FailedTestsTab/FailedTestsTab.tsx 93.10% <ø> (ø)
src/pages/RepoPage/RepoPageTabs.tsx 100.00% <ø> (ø)
... and 6 more

... and 15 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.81% <95.40%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.74% <100.00%> (+<0.01%) ⬆️
UI 99.15% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96f88d8...10a0dde. Read the comment docs.

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 95.57823% with 13 lines in your changes missing coverage. Please review.

Project coverage is 99.09%. Comparing base (96f88d8) to head (10a0dde).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../FailedTestsPage/MetricsSection/MetricsSection.tsx 91.86% 7 Missing ⚠️
...ledTestsPage/FailedTestsTable/FailedTestsTable.tsx 92.00% 4 Missing ⚠️
...ailedTestsPage/SelectorSection/SelectorSection.tsx 95.74% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main    #3174    +/-   ##
========================================
  Coverage   99.09%   99.09%            
========================================
  Files         804      810     +6     
  Lines       14187    14422   +235     
  Branches     4024     4105    +81     
========================================
+ Hits        14058    14291   +233     
- Misses        120      124     +4     
+ Partials        9        7     -2     
Files with missing lines Coverage Δ
...FailedTestsTab/FailedTestsPage/FailedTestsPage.tsx 100.00% <100.00%> (ø)
.../SelectorSection/BranchSelector/BranchSelector.tsx 100.00% <100.00%> (ø)
...stsTab/FailedTestsPage/TableHeader/TableHeader.tsx 100.00% <100.00%> (ø)
...ge/hooks/useFlakeAggregates/useFlakeAggregates.tsx 100.00% <100.00%> (ø)
.../useInfiniteTestResults/useInfiniteTestResults.tsx 100.00% <100.00%> (ø)
...TestResultsAggregates/useTestResultsAggregates.tsx 100.00% <100.00%> (ø)
.../hooks/useTestResultsFlags/useTestResultsFlags.tsx 100.00% <100.00%> (ø)
...TestResultsTestSuites/useTestResultsTestSuites.tsx 100.00% <100.00%> (ø)
...c/pages/RepoPage/FailedTestsTab/FailedTestsTab.tsx 93.10% <ø> (ø)
src/pages/RepoPage/RepoPageTabs.tsx 100.00% <ø> (ø)
... and 6 more

... and 15 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.81% <95.40%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.74% <100.00%> (+<0.01%) ⬆️
UI 99.15% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96f88d8...10a0dde. Read the comment docs.

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Sep 10, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
6360d0c Tue, 10 Sep 2024 08:54:58 GMT Expired Expired
b95af5a Tue, 10 Sep 2024 09:35:14 GMT Expired Expired
ec95735 Wed, 18 Sep 2024 22:58:41 GMT Expired Expired
aa8fa23 Thu, 19 Sep 2024 20:21:14 GMT Expired Expired
555e411 Fri, 20 Sep 2024 15:45:09 GMT Expired Expired
d788b78 Tue, 24 Sep 2024 18:11:13 GMT Expired Expired
e7c5215 Wed, 25 Sep 2024 15:27:25 GMT Expired Expired
1a5e4ff Mon, 07 Oct 2024 21:42:06 GMT Expired Expired
950ded2 Tue, 08 Oct 2024 22:54:52 GMT Expired Expired
950ded2 Tue, 08 Oct 2024 22:54:54 GMT Expired Expired
688cfdb Wed, 09 Oct 2024 15:45:59 GMT Expired Expired
3f23c1c Wed, 09 Oct 2024 18:23:40 GMT Expired Expired
f9214bb Thu, 10 Oct 2024 21:33:22 GMT Expired Expired
4a58220 Fri, 11 Oct 2024 00:30:19 GMT Expired Expired
7a3df9d Tue, 15 Oct 2024 18:38:25 GMT Expired Expired
5f6dcfe Tue, 15 Oct 2024 18:48:15 GMT Expired Expired
cfa0c2b Fri, 18 Oct 2024 23:53:31 GMT Expired Expired
c839a51 Mon, 21 Oct 2024 16:58:19 GMT Expired Expired
b89327e Mon, 21 Oct 2024 18:32:04 GMT Expired Expired
4e17b08 Mon, 21 Oct 2024 21:35:58 GMT Expired Expired
590d5be Tue, 22 Oct 2024 15:47:02 GMT Expired Expired
590d5be Tue, 22 Oct 2024 15:49:29 GMT Expired Expired
f8fbf0f Thu, 24 Oct 2024 18:52:24 GMT Expired Expired
0ccd8b0 Thu, 24 Oct 2024 20:59:06 GMT Expired Expired
ae18238 Thu, 31 Oct 2024 18:05:37 GMT Expired Expired
ae18238 Thu, 31 Oct 2024 18:05:54 GMT Expired Expired
6e78693 Thu, 31 Oct 2024 18:57:03 GMT Expired Expired
c5a9d52 Thu, 07 Nov 2024 18:52:50 GMT Expired Expired
5a0cf15 Thu, 07 Nov 2024 21:32:22 GMT Expired Expired
4281615 Fri, 08 Nov 2024 17:58:22 GMT Expired Expired
b652a05 Fri, 08 Nov 2024 19:32:39 GMT Expired Expired
10a0dde Mon, 11 Nov 2024 19:20:32 GMT Cloud Enterprise

@codecov-notifications
Copy link

codecov-notifications bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 95.57823% with 13 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../FailedTestsPage/MetricsSection/MetricsSection.tsx 91.86% 7 Missing ⚠️
...ledTestsPage/FailedTestsTable/FailedTestsTable.tsx 92.00% 4 Missing ⚠️
...ailedTestsPage/SelectorSection/SelectorSection.tsx 95.74% 2 Missing ⚠️

Impacted file tree graph

@@           Coverage Diff            @@
##             main    #3174    +/-   ##
========================================
  Coverage   99.09%   99.09%            
========================================
  Files         804      810     +6     
  Lines       14187    14422   +235     
  Branches     4017     4112    +95     
========================================
+ Hits        14058    14291   +233     
- Misses        120      124     +4     
+ Partials        9        7     -2     
Files with missing lines Coverage Δ
...FailedTestsTab/FailedTestsPage/FailedTestsPage.tsx 100.00% <100.00%> (ø)
.../SelectorSection/BranchSelector/BranchSelector.tsx 100.00% <100.00%> (ø)
...stsTab/FailedTestsPage/TableHeader/TableHeader.tsx 100.00% <100.00%> (ø)
...ge/hooks/useFlakeAggregates/useFlakeAggregates.tsx 100.00% <100.00%> (ø)
.../useInfiniteTestResults/useInfiniteTestResults.tsx 100.00% <100.00%> (ø)
...TestResultsAggregates/useTestResultsAggregates.tsx 100.00% <100.00%> (ø)
.../hooks/useTestResultsFlags/useTestResultsFlags.tsx 100.00% <100.00%> (ø)
...TestResultsTestSuites/useTestResultsTestSuites.tsx 100.00% <100.00%> (ø)
...c/pages/RepoPage/FailedTestsTab/FailedTestsTab.tsx 93.10% <ø> (ø)
src/pages/RepoPage/RepoPageTabs.tsx 100.00% <ø> (ø)
... and 6 more

... and 15 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.81% <95.40%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.74% <100.00%> (+<0.01%) ⬆️
UI 99.15% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96f88d8...10a0dde. Read the comment docs.

@nicholas-codecov
Copy link
Contributor

nicholas-codecov commented Sep 10, 2024

Was playing around with this, looking good so far!

Can you take a peak at the responsive styles? 📱 👀

Screenshot 2024-09-10 at 07 18 05

@nicholas-codecov
Copy link
Contributor

Playing around a bit more, seems like some new responsive issues have snuck in with the row of selectors, which seems to also be creating a bit of havoc with the table horizontal scrolling 👀

Screenshot 2024-11-07 at 12 24 42

@ajay-sentry ajay-sentry marked this pull request as ready for review November 8, 2024 17:51
Copy link
Contributor

@suejung-sentry suejung-sentry left a comment

Choose a reason for hiding this comment

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

Approved this massive effort - nice work, team! 🎉 🎉

I added some nits that prove I actually read it 😂 but don't need to be addressed before shipping this iteration (in fact, you probably don't want to since it can potentially introduce new errors). I also did a QA sweep last week on the preview deploy and added some small tickets to the polish epic. Amazing stuff! 🚀

const parsedData = TestResultsTestSuitesSchema.safeParse(res?.data)

if (!parsedData.success) {
return Promise.reject({
Copy link
Contributor

Choose a reason for hiding this comment

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

Not blocking or needed now - with the new pattern per here if you use the helper rejectNetworkError it will send to sentry which is handy

Copy link
Contributor

Choose a reason for hiding this comment

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

PR up here! #3484

totalSkips={aggregates?.totalSkips}
totalSkipsPercentChange={aggregates?.totalSkipsPercentChange}
updateParams={updateParams}
isSelected={queryParams?.parameter === 'SKIPPED_TESTS'}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not blocking - would be nice to use the constant defined elsewhere (I think TestResultsFilterParameter)

Copy link
Contributor

Choose a reason for hiding this comment

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

PR up here! #3484

cell: (info) => {
const value = (info.renderValue() ?? 0) * 100
const isInt = Number.isInteger(info.renderValue())
return isInt ? `${value}%` : `${value.toFixed(2)}%`
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically if info.renderValue() is not a number this could end up saying NaN%. Maybe an edge case don't need to expect or can add to post-release polish as needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the failure rate (the value here), the API always returns a float, so we're safe!
ref: https://github.com/codecov/codecov-api/blob/main/graphql_api/types/test_results/test_results.graphql#L5

interval?: MeasurementInterval
parameter?: TestResultsFilterParameterType
term?: string
test_suites?: string[]
Copy link
Contributor

Choose a reason for hiding this comment

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

I was wondering why this one was snake case - guess it's that way in api - https://github.com/codecov/codecov-api/blob/7857053efdb545165cbce4ffc0bd9526d82a73aa/graphql_api/types/inputs/test_results_filters.graphql#L4

Seems ok as is - if we ever have time to clean it up can grab it later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

testAnalytics: z
.object({
testResultsAggregates: z.object({
totalDuration: z.number(),
Copy link
Contributor

Choose a reason for hiding this comment

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

In too deep with this now but would be nice to have units on these duration fields next time. Maybe with the polish epic can add comments indicating these (totalDuration, slowestTestsDuration) represent seconds either here and/or in api

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For sure, could be a nice-to-have in the GQ schema playground too! Add comments indicating these (totalDuration, slowestTestsDuration) represent seconds #2879

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.

5 participants