Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate default homeserver config before loading the app #9496

Merged
merged 10 commits into from May 10, 2019

Conversation

@turt2live
Copy link
Member

turt2live commented Apr 16, 2019

Reviewer: This is generally best reviewed as the final diff rather than the individual commits. Note that there's a TODO comment in the diff which has the intention of being followed up by a later PR - the PRs for this work item are getting a bit large, so this is being put up for review with a known deficiency.

The TODO comment affects those who happen to use https://riot.im/develop/#/login?hs_url=https://matrix.org instead of the other options. It may also affect people's ability to claim 3pid validations.

See #9290
Fixes #8826

Please review with matrix-org/matrix-react-sdk#2941 (the implementation)


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.

Requires matrix-org/matrix-js-sdk#897 Merged.


Blocked on clarification regarding identity server behaviour. Going forward with this as-proposed with the intention of verifying that this is the correct behaviour.

We strive for not having defaults anymore, however the identity server is optional across the stack. Additionally, there is some concern that the federation is torn on whether or not .well-known should include an identity server:

Total servers: 966

Responses by discovery state
----------------------------
STATE               | COUNT | PERCENT
wk_not_found        | 463   | 47.93 %
has_identity_server | 101   | 10.46 %
no_identity_server  | 69    | 7.14 %
error               | 333   | 34.47 %

(sampled from #riot-web, #matrix, and #riot-web-announcements)

@turt2live turt2live added the blocked label Apr 16, 2019
@turt2live turt2live requested a review from lampholder Apr 16, 2019
@turt2live turt2live removed the blocked label Apr 16, 2019
@turt2live turt2live requested a review from vector-im/riot-web Apr 16, 2019
@turt2live

This comment has been minimized.

Copy link
Member Author

turt2live commented Apr 16, 2019

asking for code review to make sure that the approach is valid. The behaviour may change though

@turt2live turt2live added this to In Review in Workflow Apr 17, 2019
@bwindels bwindels requested review from bwindels and removed request for vector-im/riot-web Apr 18, 2019
Copy link
Contributor

bwindels left a comment

Approach looks good to me! Great improvement to lower confusion.

README.md Show resolved Hide resolved
src/vector/index.js Outdated Show resolved Hide resolved
@turt2live turt2live self-assigned this Apr 18, 2019
@turt2live turt2live removed this from In Review in Workflow Apr 18, 2019
@turt2live turt2live removed the request for review from lampholder May 3, 2019
@turt2live

This comment has been minimized.

Copy link
Member Author

turt2live commented May 3, 2019

Right, I'm moving forward with the identity server behaviour as proposed - if we want to change it, it isn't terribly difficult but needs some thought. This part of the whole stack is also ready for review by someone.

@turt2live turt2live requested a review from vector-im/riot-web May 3, 2019
@turt2live turt2live removed their assignment May 3, 2019
@turt2live turt2live added this to In Review in Workflow May 3, 2019
@turt2live turt2live dismissed bwindels’s stale review May 3, 2019

approving review is for the approach, not the code - dismissing so that github doesn't think this is approved

@turt2live

This comment has been minimized.

Copy link
Member Author

turt2live commented May 3, 2019

The tests are actually fairly sensitive to these changes, so I'm pulling this out of review until I can fix them.

@turt2live turt2live removed the request for review from vector-im/riot-web May 3, 2019
@turt2live turt2live moved this from In Review to In Progress in Workflow May 3, 2019
turt2live added 8 commits Apr 16, 2019
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).
@turt2live turt2live force-pushed the travis/guests/block-ui branch from ed19ec6 to a5092dc May 3, 2019
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.
@turt2live turt2live requested a review from vector-im/riot-web May 3, 2019
@turt2live turt2live moved this from In Progress to In Review in Workflow May 3, 2019
@bwindels bwindels requested review from bwindels and removed request for vector-im/riot-web May 7, 2019
Copy link
Contributor

bwindels left a comment

lgtm!

@turt2live turt2live self-assigned this May 8, 2019
@turt2live turt2live changed the base branch from develop to travis/feature/wellknown2 May 10, 2019
@turt2live

This comment has been minimized.

Copy link
Member Author

turt2live commented May 10, 2019

Changing the base to travis/feature/wellknown2 so that this can land with further PRs being reviewed against that branch. Will merge the feature branch to develop when it is safe.

@turt2live turt2live closed this May 10, 2019
@turt2live turt2live reopened this May 10, 2019
@turt2live

This comment has been minimized.

Copy link
Member Author

turt2live commented May 10, 2019

... also I'm going to press the right buttons

@turt2live turt2live merged commit 886828c into travis/feature/wellknown2 May 10, 2019
4 checks passed
4 checks passed
buildkite/riot-web/pr Build #249 passed (4 minutes, 16 seconds)
Details
buildkite/riot-web/pr/eslint-lint Passed (1 minute, 3 seconds)
Details
buildkite/riot-web/pr/karma-tests Passed (3 minutes, 11 seconds)
Details
buildkite/riot-web/pr/pipeline Passed (3 seconds)
Details
Workflow automation moved this from In Review to In Test May 10, 2019
@turt2live turt2live deleted the travis/guests/block-ui branch May 10, 2019
@turt2live turt2live removed this from In Test in Workflow May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.