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

Improve performance time for ImpactedFiles resolver #1181

Merged
merged 7 commits into from
Mar 3, 2025

Conversation

adrian-codecov
Copy link
Contributor

Purpose/Motivation

This PR intends to improve loading times in the Pull detail page by adjusting the logic in the ImpactedFiles resolver.

Links to relevant tickets

This is one of the many resolvers I'd like to tackle with the investigation done here.
GH Ticket

What does this PR do?

I'm improving the time it takes to finish the ImpactedFiles resolver. This resolver is used both in the commit + pull details page, and it needlessly calls the provider every time we get to this page. That's right, we call GH/GL/BB every time you hit any of these pages to display data that doesn't need the provider (there's one part that rightfully requests data, but that's when you unfurl the specific file to see the diff data). This is because we use the head_report key, which always has an "apply_diff" function to it, calling GH in the process.

Most of the data displayed in these pages either comes from our DB or from a file stored in GCS. Therefore, I'm adjusting the resolver to use a property that doesn't rely on the data that comes from github, with the caveat that I need to be mindful that I won't need that data, which I dont.

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.

@adrian-codecov adrian-codecov requested a review from a team as a code owner February 28, 2025 20:45
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.88%. Comparing base (bd2fea7) to head (e8bbefb).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1181      +/-   ##
==========================================
- Coverage   95.88%   95.88%   -0.01%     
==========================================
  Files         493      493              
  Lines       16869    16864       -5     
==========================================
- Hits        16175    16170       -5     
  Misses        694      694              
Flag Coverage Δ
unit 95.88% <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.

@codecov-notifications
Copy link

codecov-notifications bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@JerrySentry JerrySentry left a comment

Choose a reason for hiding this comment

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

chatted about this, this is huge.

@adrian-codecov adrian-codecov enabled auto-merge March 3, 2025 19:39
@adrian-codecov adrian-codecov added this pull request to the merge queue Mar 3, 2025
Merged via the queue into main with commit a9b4f6a Mar 3, 2025
27 of 28 checks passed
@adrian-codecov adrian-codecov deleted the 3397-improve-impacted-files-resolver-time branch March 3, 2025 19:48
@JerrySentry JerrySentry restored the 3397-improve-impacted-files-resolver-time branch March 7, 2025 00:33
JerrySentry added a commit that referenced this pull request Mar 7, 2025
Copy link

overwatch-beta bot commented Mar 7, 2025

✅ Sentry found no issues in your recent changes ✅

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.

2 participants