-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Create DB session provider(based on xorm) #13031
Create DB session provider(based on xorm) #13031
Conversation
This PR creates a Xorm session provider which creates the appropriate Session table for macaron/session. Fix go-gitea#7137 Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
lint failure ;) |
Codecov Report
@@ Coverage Diff @@
## master #13031 +/- ##
==========================================
- Coverage 42.62% 42.55% -0.07%
==========================================
Files 672 675 +3
Lines 73785 73933 +148
==========================================
+ Hits 31448 31460 +12
- Misses 37247 37387 +140
+ Partials 5090 5086 -4
Continue to review full report at Codecov.
|
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
conflicts ;) |
done |
Co-authored-by: techknowlogick <matti@mdranta.net>
But this still don't resolve the mysql session provider unavailable problem? Could we change mysql as an alias of xorm provider? |
Codecov Report
@@ Coverage Diff @@
## master #13031 +/- ##
==========================================
+ Coverage 42.21% 42.23% +0.02%
==========================================
Files 767 770 +3
Lines 81624 81888 +264
==========================================
+ Hits 34458 34586 +128
- Misses 41531 41674 +143
+ Partials 5635 5628 -7
Continue to review full report at Codecov.
|
well the idea would be that the other db session providers would be considered deprecated. |
Imho we should just remove them and add breaking change here. Also we could make it a default one. |
Signed-off-by: Andrew Thornton <art27@cantab.net>
So removing the mysql and postgres providers may be a little aggressive - happy to remove them if wanted though.
In terms of making it the default I think there is still a place for the filesystem based sessions.
Adding the User ID would be a breaking change from the macaron session provider stuff - we'd have to change the API considerably. |
I don't see much need for options duplicating functionality. |
The tablename |
I don't think thats much of the problem that we lose session data, it's not critical |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
conflicts fixed |
Since macaron will be replaced by chi, I would like to merge this after macaron has been replaced. |
Please resolve the conflicts. |
@lunny I've updated. I don't think there's any changes with chi-session but you might be more aware of these. |
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.
And I would like name it DB
session.
|
Signed-off-by: Andrew Thornton <art27@cantab.net>
🚀 |
This PR creates a Xorm session provider which creates
the appropriate Session table for macaron/session.
Fix #7137
Signed-off-by: Andrew Thornton art27@cantab.net