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(relevant warnings) Predict relevant warnings #1882

Open
wants to merge 40 commits into
base: main
Choose a base branch
from

Conversation

kddubey
Copy link
Contributor

@kddubey kddubey commented Feb 6, 2025

Needs getsentry/sentry#85133 to go in first

Background: tech spec

Currently, the tests consist of mocks and patches. In the future, can store real data and VCR tests like autofix

demo

Copy link
Member

@suejung-sentry suejung-sentry left a comment

Choose a reason for hiding this comment

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

This is a work of art! Amazing stuff!

}
headers = get_codecov_auth_header(request)
requests.post(
url="https://overwatch.codecov.dev/api/ai/seer/relevant-warnings",
Copy link
Member

Choose a reason for hiding this comment

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

At the very end, we can point this at prod overwatch (not deployed yet), which sounds like it'll end up at overwatch.codecov.io



# Copied from https://github.com/codecov/bug-prediction-research/blob/main/src/core/typings.py
class Location(BaseModel):

Choose a reason for hiding this comment

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

Depending on the tool we can have the full code region (start_line, start_column, end_line, end_column)

Would we be interested in that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm good question. i don't think start_column or end_column are particularly useful rn

i realized it would prolly simplify things if the encoded_location string (which matches the regex in Location) was instead a:

from pydantic import BaseModel

class Location(BaseModel):
    filename: str
    start_line: str
    end_line: str

so a warning in the overwatch request has location={"filename": ..., "start_line": ..., "end_line": ...} instead of encoded_location. can also include start_column, end_column keys since pydantic will just ignore them if they're not in the model

low priority tho, so up to you if you wanna make this change in overwatch

@kddubey kddubey marked this pull request as ready for review February 21, 2025 19:50
@kddubey kddubey requested a review from a team as a code owner February 21, 2025 19:50
@kddubey kddubey changed the title feat(relevant warnings) (WIP) Predict relevant warnings feat(relevant warnings) Predict relevant warnings Feb 21, 2025
@kddubey kddubey requested a review from jennmueng February 21, 2025 19:52
Copy link
Member

@jennmueng jennmueng left a comment

Choose a reason for hiding this comment

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

only some nits nothing major, otherwise lgtm on a high level

kddubey and others added 8 commits February 21, 2025 13:44
Co-authored-by: Jenn Mueng <30991498+jennmueng@users.noreply.github.com>
Co-authored-by: Jenn Mueng <30991498+jennmueng@users.noreply.github.com>
Co-authored-by: Jenn Mueng <30991498+jennmueng@users.noreply.github.com>
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.

4 participants