Use common sessioner for API and Web - #17027
Merged
6543 merged 3 commits intoSep 12, 2021
Merged
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>
Contributor
Author
|
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 |
6543
reviewed
Sep 12, 2021
6543
approved these changes
Sep 12, 2021
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.
|
techknowlogick
approved these changes
Sep 12, 2021
Member
|
APIs should be split as two parts, one is only for web, another is real API. The real API should remove |
zeripath
added a commit
to zeripath/gitea
that referenced
this pull request
Sep 13, 2021
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>
zeripath
added a commit
that referenced
this pull request
Sep 13, 2021
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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