-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add test result ingestion in the API #218
Conversation
3d5d3a5
to
8ed78eb
Compare
Codecov ReportAttention:
Changes have been made to critical files, which contain lines commonly executed in production. Learn more
Additional details and impacted files@@ Coverage Diff @@
## main #218 +/- ##
=======================================
+ Coverage 95.73 95.74 +0.01
=======================================
Files 743 746 +3
Lines 16823 16914 +91
=======================================
+ Hits 16104 16194 +90
- Misses 719 720 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov ReportAttention:
📢 Thoughts on this report? Let us know! |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #218 +/- ##
==========================================
+ Coverage 96.05% 96.07% +0.01%
==========================================
Files 628 631 +3
Lines 16307 16398 +91
==========================================
+ Hits 15664 15754 +90
- Misses 643 644 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov Report
@@ Coverage Diff @@
## main #218 +/- ##
==========================================
+ Coverage 96.05% 96.07% +0.01%
==========================================
Files 628 631 +3
Lines 16307 16398 +91
==========================================
+ Hits 15664 15754 +90
- Misses 643 644 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
38b93a7
to
09f44e9
Compare
304aee1
to
0a5aa44
Compare
badf3f9
to
fbcbfb9
Compare
42977e0
to
e155dee
Compare
e155dee
to
33e2dca
Compare
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.
RFC
c82b8b9
to
2e7899f
Compare
reports/models.py
Outdated
) | ||
duration_seconds = models.FloatField() | ||
outcome = models.IntegerField() | ||
report = models.ForeignKey( |
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.
TODO: rename this to upload
reports/models.py
Outdated
on_delete=models.CASCADE, | ||
) | ||
failure_message = models.TextField(null=True) | ||
timestamp = models.TextField() |
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.
Food for thought: do we need a timezone? Would we want to save a timestamp or a datetime? Does it matter?
reports/models.py
Outdated
) | ||
name = models.TextField() | ||
testsuite = models.TextField() | ||
env = models.TextField(default="") |
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.
TODO: if you're gonna have a default, just set null=true, see this for reference https://www.notion.so/sentry/Database-Tips-and-Tricks-76df725ded264b2a8154c960d7ef3869?pvs=4#753bec6f64e0462c8f4d9379e79af9a2
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
This field will be used to keep track of which TestInstances we should be using to compute the PR comment. Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
The reason for this change is to support concurrent writing of Test and TestInstance objects, by making the foreign key of the Test computable using the information, allowing us to create Test objects in a "fire-and-forget" way
This commit adds this field so we can order TestInstances according to their timestamp so we can show the latest TestInstance for each Test for a given commit in the PR comment. Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
the active field on the TestInstance model is no longer needed because we can use the timestamp field to determine which TestInstance should be active. Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
The timestamp field is now unnecessary as we'll be using the upload created_at time to determine the ordering of TestInstance objects. Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
b881ae0
to
b7b532c
Compare
Purpose/Motivation
This is being done to support failed test ingestion in the API.
Links to relevant tickets
codecov/engineering-team#664
Depends on: codecov/worker#197
What does this PR do?