Observable: wait for client config #5934
Open
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.
Before the ClientConfiguration would resolve immediately to undefined even if triggered right after authentication. This would cause flake in tests as commands such as chat/edit would incorrectly show a "This feature has been disabled by your site admin" message.
Now we instantly invalidate the ClientConfig if the auth status changes, but we prevent resolving of the client status until the credentials have been validated.
Test plan
E2E tests will be added in a later PR as there's some upcoming fixes to the test framework. For now I've manually validated that everything still works as before.
In particular to trigger a invalid client config and see it resolve correctly I enabled an incorrect proxy configuration. Then upon changing the config settings a new auth session is requested and the client configuration resolves correctly.