-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: Update commit graphql queries to use new coverage and bundleAna… #3363
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
@@ Coverage Diff @@
## main #3363 +/- ##
=======================================
Coverage 99.18% 99.18%
=======================================
Files 805 805
Lines 14232 14233 +1
Branches 3927 3927
=======================================
+ Hits 14116 14117 +1
Misses 107 107
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3363 +/- ##
=======================================
Coverage 99.18% 99.18%
=======================================
Files 805 805
Lines 14232 14233 +1
Branches 3922 3927 +5
=======================================
+ Hits 14116 14117 +1
Misses 107 107
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
@@ Coverage Diff @@
## main #3363 +/- ##
=======================================
Coverage 99.18% 99.18%
=======================================
Files 805 805
Lines 14232 14233 +1
Branches 3922 3922
=======================================
+ Hits 14116 14117 +1
Misses 107 107
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
Bundle ReportChanges will increase total bundle size by 4.8kB (0.08%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Bundle ReportChanges will increase total bundle size by 4.8kB (0.08%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
2632a55
to
543d7ce
Compare
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #3363 +/- ##
=======================================
Coverage 99.18% 99.18%
=======================================
Files 805 805
Lines 14232 14233 +1
Branches 3922 3922
=======================================
+ Hits 14116 14117 +1
Misses 107 107
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
fbdfd18
to
4335fa9
Compare
c2f266c
to
1592694
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are what I reviewed:
- Went through each non- .test. file and checked out the graphql query, zod schema update, and data access changes (the updates to make the
coverageAnalytics
andbundleAnalysis
as.nullable()
look good. - Did a smoke test clicking around the Preview Deploy for any regression but didn't see anything out of place
- Skimmed test files for anything out of place. Tried to look harder on any that were still JS (not TS)
I think before we remove the code on api
side I can help with another sweep to make sure we didn't miss any other frontend bits! As in you can stage the changes in api
and we can run main
frontend against it for any missed spots
coverage: percentCovered # Absolute coverage of the commit | ||
coverageAnalytics { | ||
totals { | ||
coverage: percentCovered # Absolute coverage of the commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be nice to use this opportunity to move over to percentCovered
? Since according to below coverage
is "deprecated" 2 years ago 😂
https://github.com/codecov/codecov-api/blame/main/graphql_api/types/coverage_totals/coverage_totals.graphql#L3
Looks like the resolver is set up for it, so good to go (may not hurt to do a quick check in graphQL playground) - https://github.com/codecov/codecov-api/blob/b9c83a2916464fc8cf1bfee98017e8397b6c7803/graphql_api/types/coverage_totals/coverage_totals.py#L5
Can grab it in a follow-up if we want to get this large chunk out there first and reduce the mental load
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that would cause so many changes haha, we should grab it in a separate PR imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah... i changed a couple instances but when I started going down changing other instances, the work started to balloon. I'll create a ticket for the work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
) { | ||
bundles = | ||
data.owner.repository.branch.head.bundleAnalysisReport.bundles?.map( | ||
data.owner.repository.branch.head.bundleAnalysis?.bundleAnalysisReport?.bundles?.map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting the extra ? check on bundleAnalysisReport here - I think that makes sense. Can't think of any way that'd cause different, unexpected behavior.
…lysis schemas
Description
Closes codecov/engineering-team#2285
Related to changes made in api at codecov/codecov-api#847 - TLDR: following fields in the Commit.graphql type were pulled out into another subtype.
components
,flagNames
,coverageFile
andtotals
were moved down one level intocoverageAnalytics
bundleAnalysisCompareWithParent
andbundleAnalysisReport
were moved down one level intobundleAnalysis
.The only changes made in this PR are adding in an extra level of nesting for these 6 fields in the
Commit
type.Made changes to
commit
head
parent
head
, as they are all of type
Commit
, and their uses across the codebase.*Type Pull's
comparedTo
did not use any of those fields so did not need any changes even though it is also of typeCommit
.Code Example
Notable Changes
Screenshots
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.