-
Notifications
You must be signed in to change notification settings - Fork 8
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
... :O Port Some API Models to Shared #139
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #139 +/- ##
==========================================
- Coverage 91.97% 89.30% -2.68%
==========================================
Files 117 314 +197
Lines 7187 10104 +2917
Branches 1644 1802 +158
==========================================
+ Hits 6610 9023 +2413
- Misses 545 1014 +469
- Partials 32 67 +35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -31,6 +33,10 @@ services: | |||
tmpfs: | |||
size: 1024M | |||
|
|||
redis: |
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.
Needed to run migrations tests
…ve-api-models-to-shared
…ve-api-models-to-shared
this is a monster of a change, good luck to the reviewers |
…ve-api-models-to-shared
…ve-api-models-to-shared
…ve-api-models-to-shared
…ve-api-models-to-shared
…ve-api-models-to-shared
…ve-api-models-to-shared
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.
looks like there are a lot of totally untested files in this PR. could you check if any of them have tests in API you can steal?
api_archive/archive.py
api_archive/storage.py
django_apps/codecov_auth/helpers.py
django_apps/codecov_auth/managers.py
django_apps/core/managers.py
- anything in
django_apps/utils
reports/api_report_service.py
doesn't necessarily have to be in this PR, but would be good not to lose coverage. i guess when some of this code is deleted from API we'll be able to find tests that cover them
also i think there is a ton of code here we can dedup beyond models lol
codecov.yml
Outdated
services: | ||
minio: | ||
hash_key: 12345bf3f7d947f2a0681b2154067890 | ||
verify_ssl: false | ||
host: "minio" | ||
port: 9000 | ||
# bucket: <bucket-name> | ||
# region: <bucket-region> | ||
access_key_id: codecov-default-key | ||
secret_access_key: codecov-default-secret | ||
client_uploads: true | ||
|
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 section looks like it is meant to be in an "installation yaml" but this is a repo configuration yaml. also is that hash_key
value a real secret or
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.
i know there is some mock config stuff set up in https://github.com/codecov/shared/blob/main/tests/conftest.py but i don't actually know if/where there is a yml for the docker-compose setup. it may be that nobody needed one. if we need one now, put it in the docker
folder?
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.
hash_key
is fake, I manually used prepend/append 12345 67890 to make it fake
Its late so not fully following the rest of the ask here, should I move this to a docker folder?
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.
i think this codecov.yml
is the one that defines our flags and stuff for our CI uploads, not the codecov.yml
that defines the service config inside docker-compose. i don't think this will be read by anything. if you just delete it, does everything still work?
TLDR, we want to move all django API models to shared so they're shared amongst different codebases. This is a stab at it, first taking a look at
Core
,Codecov_auth
andReports
apps.Specifically,
makemigrations
commands had noopFiles to take a special look at
The rest of the files are mostly copy-paste models + migrations
Note
I had to adjust some imports in migrations independently, for example, they used to be
from core.models import DateTimeWithouTZField
to from shared.django_apps.core.models import DateTimeWithouTZField`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.