-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Conversation
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 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", |
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.
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): |
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.
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?
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.
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
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.
only some nits nothing major, otherwise lgtm on a high level
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>
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