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

feat: Bundle Analysis v0.5 Update GraphQL schema #405

Merged
merged 9 commits into from
Feb 20, 2024
Merged

Conversation

JerrySentry
Copy link
Contributor

@JerrySentry JerrySentry commented Feb 16, 2024

Purpose/Motivation

Adds the new updated GQL schema for BA v0.5. Also implements the bundleData type, a new format to retrieve size and load times. Many resolvers remain unimplemented for the coming PRs so that this doesn't get too big.

Links to relevant tickets

codecov/engineering-team#1190

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.

@@ -3,16 +3,18 @@

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is all boilerplate imports

@@ -0,0 +1,21 @@
from graphql_api.helpers.ariadne import ariadne_load_local_graphql
Copy link
Contributor Author

Choose a reason for hiding this comment

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

More boilerplate imports and refactored the folder structure to be:

bundle_analysis/
  base.py
  report.py
  comparison.py

before it was

bundle_analysis_comparison/
  comparison.py
bundle_analysis_report/
  report.py

@@ -0,0 +1,38 @@
type BundleSize {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the new types here, except BundleReport is modified.

@@ -0,0 +1,80 @@
from typing import List, Mapping
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added lots of Unimplemented resolvers here for coming PRs and also implemented a new way to present size and load times. Also marked the old ways of calculating it to be removed when it is fully migrated on the FE.

@@ -3,11 +3,10 @@
from ariadne import ObjectType, UnionType

Copy link
Contributor Author

Choose a reason for hiding this comment

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

similar to base.py, added implementation for new bundleData and marked old ones to be deprecated

@codecov-staging
Copy link

codecov-staging bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cdab422) 96.08% compared to head (401aa95) 96.09%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
+ Coverage   96.08%   96.09%   +0.01%     
==========================================
  Files         637      637              
  Lines       16598    16654      +56     
==========================================
+ Hits        15948    16004      +56     
  Misses        650      650              
Flag Coverage Δ
unit 96.09% <100.00%> (+0.01%) ⬆️
unit-latest-uploader 96.09% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codecov-public-qa bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cdab422) 96.08% compared to head (401aa95) 96.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
+ Coverage   96.08%   96.09%   +0.01%     
==========================================
  Files         637      637              
  Lines       16598    16654      +56     
==========================================
+ Hits        15948    16004      +56     
  Misses        650      650              
Flag Coverage Δ
unit 96.09% <100.00%> (+0.01%) ⬆️
unit-latest-uploader 96.09% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
graphql_api/types/__init__.py 100.00% <100.00%> (ø)
graphql_api/types/bundle_analysis/__init__.py 100.00% <100.00%> (ø)
graphql_api/types/bundle_analysis/base.py 100.00% <100.00%> (ø)
graphql_api/types/bundle_analysis/comparison.py 100.00% <ø> (ø)
graphql_api/types/bundle_analysis/report.py 100.00% <100.00%> (ø)
services/bundle_analysis.py 100.00% <100.00%> (ø)

Impacted file tree graph

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cdab422) 95.76% compared to head (401aa95) 95.79%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #405     +/-   ##
=======================================
+ Coverage   95.76   95.79   +0.03     
=======================================
  Files        753     757      +4     
  Lines      17118   17233    +115     
=======================================
+ Hits       16393   16508    +115     
  Misses       725     725             
Flag Coverage Δ
unit 96.09% <100.00%> (+0.01%) ⬆️
unit-latest-uploader 96.09% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JerrySentry JerrySentry marked this pull request as ready for review February 16, 2024 20:18
@JerrySentry JerrySentry requested a review from a team as a code owner February 16, 2024 20:18
@JerrySentry JerrySentry merged commit 21c3d75 into main Feb 20, 2024
21 of 22 checks passed
@JerrySentry JerrySentry deleted the api_1190 branch February 20, 2024 20:43
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.

None yet

3 participants