Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Conversation

@michelletran-sentry
Copy link
Contributor

@michelletran-sentry michelletran-sentry commented Feb 13, 2025

Purpose/Motivation

Removes the Impact Analysis API endpoints and data from API.

I've stubbed out Impact Analysis fields from the GraphQL API, as it would take a lot of work to remove them from Gazebo first. So, just returning a bunch of dummy values for now.

Links to relevant tickets

codecov/engineering-team#2833

Notes to Reviewer

We've already given notice to users that Impact Analysis is deprecated as of January 31 2025. There's still quite a few calls to the endpoint, but most of them 401. There's a total of 2 successful calls to the API in the past 2 weeks. The feature itself has been broken for months, so removing the endpoints is probably fine.

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-notifications
Copy link

codecov-notifications bot commented Feb 13, 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!

@codecov
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.07%. Comparing base (b8a000a) to head (3286c26).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1154      +/-   ##
==========================================
- Coverage   96.07%   96.07%   -0.01%     
==========================================
  Files         838      836       -2     
  Lines       19779    19723      -56     
==========================================
- Hits        19002    18948      -54     
+ Misses        777      775       -2     
Flag Coverage Δ
unit 95.94% <100.00%> (-0.02%) ⬇️
unit-latest-uploader 95.94% <100.00%> (-0.02%) ⬇️

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.

@github-actions
Copy link
Contributor

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@codecov-qa
Copy link

codecov-qa bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.94%. Comparing base (b8a000a) to head (3286c26).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

@michelletran-sentry michelletran-sentry force-pushed the 2833_remove_impact_analysis branch from ed73845 to 7b53859 Compare February 14, 2025 18:43
@michelletran-sentry michelletran-sentry marked this pull request as ready for review February 14, 2025 19:07
@michelletran-sentry michelletran-sentry requested a review from a team as a code owner February 14, 2025 19:07
Copy link
Contributor

@adrian-codecov adrian-codecov left a comment

Choose a reason for hiding this comment

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

Lgtm, although I'd confirm w/ someone from the apps team if they're okay w/ the stubbing. Not sure if there's already someone working on Gazebo to stop querying those fields

@michelletran-sentry
Copy link
Contributor Author

Not sure if there's already someone working on Gazebo to stop querying those fields

Probably not. I looked into doing it myself, but there were a lot of references and I am but a lowly backend dev. I might pick it up again, or create a ticket for the Apps Team to clean up. But in the meantime, I want to at least clean up API without affecting Gazebo.

def resolve_is_critical_file(data, info):
critical_filenames = info.context["profiling_summary"].critical_filenames
return data.get("path") in critical_filenames
"""DEPRECATED. Returning dummy value"""
Copy link
Contributor

Choose a reason for hiding this comment

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

one thing you can do on the related .graphql files is also tag these fields with @deprecated and say something like "impact analysis removed, these are just dummy values" or something, until we actually remove those fields

Copy link
Contributor

@ajay-sentry ajay-sentry Feb 14, 2025

Choose a reason for hiding this comment

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

This seems to be the only example in API atm

coverage: Float @deprecated(reason: "Use `percentCovered`")

command = info.context["executor"].get_command("repository")
return command.get_repository_token(repository, token_type="profiling")
"""DEPRECATED"""
return ""
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's probably safer for me to leave it stubbed until it's completely removed from Gazebo.


@path_content_file_bindable.field("isCriticalFile")
@sync_to_async
def resolve_is_critical_file(item: Union[File, Dir], info) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

this one's used a lot, will require some surgery in Gazebo

@sentry_sdk.trace
@impacted_file_bindable.field("isCriticalFile")
@sync_to_async
def resolve_is_critical_file(impacted_file: ImpactedFile, info) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

same story for this being used a lot and needs surgery

Copy link
Contributor

@ajay-sentry ajay-sentry left a comment

Choose a reason for hiding this comment

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

couple thoughts / comments after doing a little gazebo searching but changes look good as is if we wanna ship

I've stubbed out Impact Analysis fields from the API, as it would take a lot of work to remove them
from Gazebo first. So, just returning a bunch of dummy values for now.
@michelletran-sentry michelletran-sentry force-pushed the 2833_remove_impact_analysis branch from ea83341 to fb40914 Compare February 18, 2025 15:41
This is not being used in Gazebo, so removing it.
This is to make clear that these fields are actually deprecated.
@michelletran-sentry michelletran-sentry force-pushed the 2833_remove_impact_analysis branch from fb40914 to 3286c26 Compare February 18, 2025 15:44
@michelletran-sentry
Copy link
Contributor Author

@ajay-sentry Updated based on comments. I've removed criticalFiles as it doesn't look like that's used at all in Gazebo. For everything else, I've just left them stubbed until we can remove them from Gazebo (with deprecated tag).

@ajay-sentry
Copy link
Contributor

@michelletran-codecov Thanks for doing that! Lgtm ✅

@michelletran-sentry michelletran-sentry added this pull request to the merge queue Feb 18, 2025
Merged via the queue into main with commit 5fb43ea Feb 18, 2025
17 of 19 checks passed
@michelletran-sentry michelletran-sentry deleted the 2833_remove_impact_analysis branch February 18, 2025 19:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants