-
Notifications
You must be signed in to change notification settings - Fork 26
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: Migrate bundle analysis services to Query V5 #3430
base: main
Are you sure you want to change the base?
feat: Migrate bundle analysis services to Query V5 #3430
Conversation
Bundle ReportChanges will increase total bundle size by 24.36kB (0.14%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Bundle ReportChanges will increase total bundle size by 24.36kB (0.14%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #3430 +/- ##
==========================================
- Coverage 99.09% 99.08% -0.01%
==========================================
Files 804 804
Lines 14187 14184 -3
Branches 4017 4009 -8
==========================================
- Hits 14058 14054 -4
- Misses 120 121 +1
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3430 +/- ##
==========================================
- Coverage 99.09% 99.08% -0.01%
==========================================
Files 804 804
Lines 14187 14184 -3
Branches 4024 4016 -8
==========================================
- Hits 14058 14054 -4
- Misses 120 121 +1
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3430 +/- ##
==========================================
- Coverage 99.09% 99.08% -0.01%
==========================================
Files 804 804
Lines 14187 14184 -3
Branches 4024 4016 -8
==========================================
- Hits 14058 14054 -4
- Misses 120 121 +1
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3430 +/- ##
==========================================
- Coverage 99.09% 99.08% -0.01%
==========================================
Files 804 804
Lines 14187 14184 -3
Branches 4017 4009 -8
==========================================
- Hits 14058 14054 -4
- Misses 120 121 +1
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
a3af02a
to
3e11000
Compare
@@ -161,7 +161,7 @@ const createColumns = (totalBundleSize: number | null) => [ | |||
/>{' '} | |||
<ChangeOverTime | |||
change={value?.change?.size.uncompress} | |||
hasMeasurements={value.measurements.length > 0 ?? false} | |||
hasMeasurements={value.measurements.length > 0} |
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.
This was something that Vite kept bringing up as an optimization so finally threw it in.
833a3d0
to
d36c7dc
Compare
provider: string | ||
owner: string | ||
repo: string | ||
branch?: string | ||
branch: string | null | undefined |
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.
Why this instead of branch?: string | null
?
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.
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.
Oh so you just want this to always be called with a branch param?
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.
Yes I would like all the arguments provided, this still makes allowances however if branch
is undefined.
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.
Ok cool beans
@@ -266,32 +271,34 @@ export const useBundleAssets = ({ | |||
dateBefore, | |||
dateAfter, | |||
filters, | |||
assetsAfter: pageParam, | |||
assetsAfter, |
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.
Does this mean that assetsAfter=null
doesn't get along well with the query? I'd think it might be worthwhile updating this API side if not. Would rather do that than do the few lines above on every infinite query.
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.
Sorry, null
works fine, and I'm updating things rn to be set to null
instead of undefined
. The type for pageParam
is inferred through the initialPageParam
so we have to assign it to a string
for the remaining cursors to keep the types happy.
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.
If null is fine, doesn't the old code work? assetsAfter: pageParam
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.
I may be misunderstanding though
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.
Soooo just did some testing, and the API is okay if just an empty string is provided ... so I'll get rid of all of this.
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.
NICE
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.
Looks good. Honestly thought the transition would require more changes, glad to see it's not so bad. Requesting changes bc I want to talk through my comments and make sure we're aligned 🫡
Description
This PR updates the hooks/services in the
services/bundleAnalysis
directory to Query V5. Some of these updates include moving fully over to thequeryOptions
API format that we will be moving towards, I didn't do this for all of these, as the PR would have grown significantly, and can be accomplished in a follow up PR.Another change I made in this PR was the removal of the
index.ts
file from theservices/bundleAnalysis
directory. Some of the benefits of this are:export * from './...'
cmd + click
on the import you're taken to the function declaration not theindex.ts
fileCloses: codecov/engineering-team#2964
Notable Changes
services/bundleAnalysis
to Query V5queryOption
API format