Validate homeserver configuration prior to loading the app#9779
Merged
Validate homeserver configuration prior to loading the app#9779
Conversation
Implements the process described here: #9290 (comment) The expectation is that later layers (like the react-sdk) will make use of the `validated_discovery_config` option instead of interpreting the config themselves. We intentionally block the UI from loading here to avoid races between discovery and the app loading.
It's usable as-is, and we can add things to it when we need to (ie: integrations).
Supply a server config to the component and adjust the wait logic to be less of a race. The Login component will noop onPasswordLogin if it is "busy", and it is busy when it requests the login flows.
Validate default homeserver config before loading the app
We don't actually need to do anything because the app transparently handles this. See #9290
For use in the rest of the app. See #9290
This doesn't cover default_server_name because that pulls in a questionable amount of JS. See #9290
Clarify comment on is_url and hs_url handling
Flag the validated config as the default config
Show resolved homeserver configuration on the mobile guide
jryans
approved these changes
May 21, 2019
Collaborator
jryans
left a comment
There was a problem hiding this comment.
Overall looks good! 😁 I would suggest waiting until after the RC on Wednesday before merging.
| let config = await getVectorConfig('..'); | ||
|
|
||
| // We manually parse the config similar to how validateServerConfig works because | ||
| // calling that function pulls in roughly 4mb of JS we don't use. |
Collaborator
There was a problem hiding this comment.
One day we'll actually fix our build to make sense... 😭
Member
Author
|
RC cut, let's land this thing 🎉 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See matrix-org/matrix-react-sdk#3001
There are no new commits on this branch. The kind of review for this PR is really just a formal green light to merge this whole thing - the individual parts have already been merged. This PR also serves as a changelog entry for when we release.
Includes:
See react-sdk PR at the top of this post for list of fixed issues.