This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Stop Auth methods from polling the config on every req. #7420
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6df2e8a
Stop Auth methods from polling the config on every req.
anoadragon453 be68e62
Changelog
anoadragon453 fca58df
Merge branch 'release-v1.13.0' of github.com:matrix-org/synapse into …
anoadragon453 a30ce76
Move check_auth_blocking to new class AuthBlocking
anoadragon453 55e8e18
Wait it's 2020
anoadragon453 a7ae929
Fix tests to modify hs' AuthBlocking config instead of hs' config
anoadragon453 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Prevent methods in `synapse.handlers.auth` from polling the homeserver config every request. |
This file contains 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
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.
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.
can we factor out a separate class rather than add all these fields to this big class?
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.
How do you mean? Moving the methods that use these to a new class or putting all these config options in a new inline class?
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.
move the methods to a new class. dunno how easy that is
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.
It's not too bad to move, I just need to update all the references to it.
I could start with just having
Auth.check_auth_blocking
call the new method though.Or I could just go ahead and update all the references. My plan is:
AuthBlocking
build_auth_blocking
method to the hs in addition tobuild_auth
.Before I get too far into any of this, does this sound sane or should we back out?
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.
sounds sensible for now
yes
I'd have
Auth.__init__
build the new objectThere 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.
Unfortunately there's quite a few tests that changed the hs's config after the hs had already been created, which need fixing up.