Repository navigation
Conversation
9836447 to
b722524
Compare
…nfig Signed-off-by: Christian Lorang <christian.lorang@nextcloud.com>
b722524 to
c687178
Compare
|
rebased after #19400 merge and cleaned up, unit tests now pass
that behavior remains unchanged and should be checked / streamlined in another PR. |
| $this->initialState->provideInitialState(Config::SUMMARY_THRESHOLD, $this->appConfig->getAppValueInt(Config::SUMMARY_THRESHOLD, 100)); | ||
| $this->initialState->provideInitialState(Config::MAX_CALL_DURATION, $this->appConfig->getAppValueInt(Config::MAX_CALL_DURATION, 0)); | ||
| $this->initialState->provideInitialState('valid_apache_php_configuration', $this->validApachePHPConfiguration()); | ||
| $this->initialState->provideInitialState(Config::MATTERBRIDGE_ENABLED, $this->appConfig->getAppValueBool(Config::MATTERBRIDGE_ENABLED)); |
There was a problem hiding this comment.
Those additions are not consumed in the frontend, so we don't need to expose them?
| public function getSignalingSecret(): string { | ||
| $config = $this->config->getAppValue('spreed', 'signaling_servers'); | ||
| $signaling = json_decode($config, true); | ||
| $config = $this->appConfig->getAppValueString(Config::SIGNALING_SERVERS_SECRET); |
There was a problem hiding this comment.
I'm confused about this. Could we just migrate from A to B and do the splitting at another time?
There was a problem hiding this comment.
The code has two places to store the secret for the signaling servers. sometimes it's in signaling_servers as the array member secret, sometimes it's in its dedicated config signaling_servers_secret, mostly in both but not always in sync.
It's not used consistently throughout the codebase. Sometimes it's set in one place and not the other, when deleting it in one place sometimes it also deletes it in the other but not always, sometimes when the value is checked it's checked in one place but not necessarily in the other.
That's what I tried to recreate here, just the other way around. Instead of looking at the array to check if it's there, check the dedicated config value and if that's empty, check the signaling_servers array if it's present.
We could reverse that again, however the code would then run into situations, where it's deleted the value from the signaling_servers array but not the signaling_servers_secret and then return a stale value.
The tests pass, but we could move it to a second PR?
AI (if applicable)
🏁 Checklist
docs/has been updated or is not requiredrefactoring all signaling server related configs to AppConfig.
These unit test failures are expected and solved by #19400:
There were 3 failures:
OCA\Talk\Tests\BackgroundJob\CheckHostedSignalingServerTest::testRunWithNoChange
Expectation failed for method name is "fetchAccountInfo" when invoked 1 time.
Method was expected to be called 1 time, actually called 0 times.
OCA\Talk\Tests\BackgroundJob\CheckHostedSignalingServerTest::testRunWithPendingToActiveChange
Expectation failed for method name is "fetchAccountInfo" when invoked 1 time.
Method was expected to be called 1 time, actually called 0 times.
OCA\Talk\Tests\BackgroundJob\CheckHostedSignalingServerTest::testRunWithPendingToActiveIncludingStunAndTurn
Expectation failed for method name is "fetchAccountInfo" when invoked 1 time.
Method was expected to be called 1 time, actually called 0 times.
Checking CI for tests and clean occ app config as some types were enforced.
needs further cleaning up, tests validations, polishing and checks that signaling_servers is used as the same array type everywhere, [servers] vs [secret] vs [server, server..]