-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref(control_silo): Consolidate User models (and authenticator) and tests #74222
Conversation
Moves all User and authenticator specific models and tests to their own directories. ref(#73856)
bin/mock-user
Outdated
@@ -8,7 +8,7 @@ import argparse | |||
|
|||
|
|||
def main(username, newsletter_consent_prompt=None): | |||
from sentry.models.user import User | |||
from sentry.users.models.users.user import User |
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.
Could this be sentry.users.models.user
? Or is the additional layer of modules helpful?
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.
Sure it definitely could go there. Just kinda worried that with all the other models, the models directory could grow p. large though we could do something like:
sentry.users.models
|
|--> auth
|
|authenticator.py
|--> emails
| user.py
| useremail.py
does this feel cleaner/makes more sense?
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.
nvm, read the rest of the review. 10 is p. few so I'm down to just flatten and put everything in models
src/sentry/models/authenticator.py
Outdated
@@ -1,204 +1,3 @@ | |||
from __future__ import annotations | |||
from ..users.models.auth.authenticator import Authenticator # NOQA |
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.
Could we do from sentry.users.models.authenticator import Authenticator
. The users app will have fewer than 10 models in it and I don't think the additional layer of directories adds much.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #74222 +/- ##
===========================================
+ Coverage 64.63% 78.12% +13.49%
===========================================
Files 6662 6673 +11
Lines 297751 298048 +297
Branches 51252 51292 +40
===========================================
+ Hits 192457 232862 +40405
+ Misses 98791 58908 -39883
+ Partials 6503 6278 -225
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Breaking down into smaller PRs |
Moves all User and authenticator specific models and tests to their own directories.
ref(#73856)