This repository was 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
Synapse-1.91.1 unittest fails with Postgres DB due to missing optional authlib dependency #16244
Copy link
Copy link
Closed
Labels
O-UncommonMost users are unlikely to come across this or unexpected workflowMost users are unlikely to come across this or unexpected workflowS-MajorMajor functionality / product severely impaired, no satisfactory workaround.Major functionality / product severely impaired, no satisfactory workaround.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.X-RegressionSomething broke which worked on a previous releaseSomething broke which worked on a previous release
Description
Description
When running unit tests for Synapse versions 1.91.1 (and 1.91.0 as well) with Postgres database enabled, the tests fail with a
synapse.config._base.ConfigError: ('MSC3861 is enabled but `authlib` is not installed. Please install authlib to use MSC3861.', ('experimental', 'msc3861', 'enabled'))
error indicating that authlib is not installed, however, nothing suggest it is newly required. This issue does not occur in version 1.90.0, where all tests pass with Postgres DB.
This output is produced in test phase of Gentoo ebuild.
Steps to reproduce
Run tests with Postgres DB but without authlib.
Homeserver
unittest framework
Synapse Version
1.91.1
Installation Method
Other (please mention below)
Database
single PostgreSQL, fresh instance for tests
Workers
I don't know
Platform
Gentoo AMD64
Configuration
Following optional dependencies are installed:
- pyicu
- txredisapi, hiredis
- psycopg2
Relevant log output
===============================================================================
[ERROR]
Traceback (most recent call last):
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1/tests/unittest.py", line 122, in new
return code(orig, *args, **kwargs)
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1/tests/unittest.py", line 216, in setUp
return orig()
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1/tests/replication/_base.py", line 256, in setUp
super().setUp()
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1/tests/unittest.py", line 338, in setUp
self.hs = self.make_homeserver(self.reactor, self.clock)
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1/tests/unittest.py", line 451, in make_homeserver
hs = self.setup_test_homeserver()
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1/tests/unittest.py", line 595, in setup_test_homeserver
config_obj = make_homeserver_config_obj(config)
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1/tests/unittest.py", line 172, in make_homeserver_config_obj
config_obj = _parse_config_dict(json.dumps(config, sort_keys=True))
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1/tests/unittest.py", line 157, in _parse_config_dict
config_obj.parse_config_dict(json.loads(config), "", "")
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1-python3_11/install/usr/lib/python3.11/site-packages/
synapse/config/_base.py", line 823, in parse_config_dict
self.invoke_all(
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1-python3_11/install/usr/lib/python3.11/site-packages/synapse/config/_base.py", line 422, in invoke_all
res[config_class.section] = getattr(config, func_name)(*args, **kwargs)
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1-python3_11/install/usr/lib/python3.11/site-packages/synapse/config/experimental.py", line 401, in read_config
self.msc3861 = MSC3861(**experimental.get("msc3861", {}))
File "<attrs generated init synapse.config.experimental.MSC3861>", line 13, in __init__
__attr_validator_enabled(self, __attr_enabled, self.enabled)
File "/usr/lib/python3.11/site-packages/attr/_make.py", line 2927, in __call__
v(inst, attr, value)
File "/var/tmp/portage/net-im/synapse-1.91.1/work/synapse-1.91.1-python3_11/install/usr/lib/python3.11/site-packages/synapse/config/experimental.py", line 70, in _check_enabled
raise ConfigError(
synapse.config._base.ConfigError: ('MSC3861 is enabled but authlib is not installed. Please install authlib to use MSC3861.', ('experimental', 'msc3861', 'enabled'))
tests.replication.test_intro_token_invalidation.IntrospectionTokenCacheInvalidationTestCase.test_stream_introspection_token_invalidation
-------------------------------------------------------------------------------
Ran 2895 tests in 254.077s
FAILED (skips=134, errors=1, successes=2760)Anything else that would be useful to know?
No response
Metadata
Metadata
Assignees
Labels
O-UncommonMost users are unlikely to come across this or unexpected workflowMost users are unlikely to come across this or unexpected workflowS-MajorMajor functionality / product severely impaired, no satisfactory workaround.Major functionality / product severely impaired, no satisfactory workaround.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.X-RegressionSomething broke which worked on a previous releaseSomething broke which worked on a previous release