-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Add owner_name column for table repository for maintaince reason #9717
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
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 should improve the speed quite a bit.
Just a nit (and the CI that's acting up).
68a2398
to
af584e0
Compare
I see it now |
You need to update the test fixtures |
In particular this file: https://github.com/go-gitea/gitea/blob/master/models/fixtures/repository.yml Or rather this one: https://github.com/lunny/gitea/blob/lunny/save_owner_name_repo/models/fixtures/repository.yml Done |
5ea84c6
to
fba2bb7
Compare
Ok so it looks like there are a few places where owner is expected to be present because it would have been loaded in order to get the owner name. I'm not sure what's best here, it might be that it's easiest to just stick LoadOwner s before every call to repo. Owner but that could easily cause some deadlocks - and that still doesn't necessarily catch the templates. There's also an issue with a unit test. |
759da38
to
7b62e9a
Compare
Codecov Report
@@ Coverage Diff @@
## master #9717 +/- ##
=========================================
Coverage ? 42.23%
=========================================
Files ? 593
Lines ? 78207
Branches ? 0
=========================================
Hits ? 33028
Misses ? 41128
Partials ? 4051
Continue to review full report at Codecov.
|
We should expect to have to fix several NPEs in the coming weeks regarding this - however, I still think this is worthwhile. We can also begin the process of removing all of the unnecessary loadOwner calls that this will free us from making. |
As title. Inspired by @zeripath 's comment.