-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Use common sessioner for API and Web #17027
Use common sessioner for API and Web #17027
Conversation
Instead of creating separate sessioner and doubly initialising the provider just use the same sessioner for the API and Web routes. Signed-off-by: Andrew Thornton <art27@cantab.net>
If we merge in https://gitea.com/go-chi/session/pulls/1 then this will fix a data-race detected in https://drone.gitea.io/go-gitea/gitea/43900/2/14 |
Codecov Report
@@ Coverage Diff @@
## main #17027 +/- ##
==========================================
- Coverage 45.23% 45.22% -0.01%
==========================================
Files 766 766
Lines 86641 86632 -9
==========================================
- Hits 39191 39179 -12
+ Misses 41108 41107 -1
- Partials 6342 6346 +4
Continue to review full report at Codecov.
|
APIs should be split as two parts, one is only for web, another is real API. The real API should remove |
Update to latest go-chi/session where the NewManager causes a new Provider instantiation instead of reconfiguring an old one. (https://gitea.com/go-chi/session/pulls/1) The NewManager call is now concurrency safe and would allow live reconfiguration in future but for now this PR simply fixes an intermittent "data-race" detected in our tests. (See https://drone.gitea.io/go-gitea/gitea/43900/2/14) Related go-gitea#17027 Related go-gitea#1441 Signed-off-by: Andrew Thornton <art27@cantab.net>
Update to latest go-chi/session where the NewManager causes a new Provider instantiation instead of reconfiguring an old one. (https://gitea.com/go-chi/session/pulls/1) The NewManager call is now concurrency safe and would allow live reconfiguration in future but for now this PR simply fixes an intermittent "data-race" detected in our tests. (See https://drone.gitea.io/go-gitea/gitea/43900/2/14) Related #17027 Related #1441 Signed-off-by: Andrew Thornton <art27@cantab.net>
Instead of creating separate sessioner and doubly initialising the provider just
use the same sessioner for the API and Web routes.
Signed-off-by: Andrew Thornton art27@cantab.net