-
Notifications
You must be signed in to change notification settings - Fork 40
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
SWC-7126 - Fix bootstrapping redirect bug #5560
SWC-7126 - Fix bootstrapping redirect bug #5560
Conversation
… placeController before it has been set
|
||
FluentFuture | ||
.from( | ||
whenAllComplete( | ||
featureFlagConfigFuture, | ||
synapsePropertiesFuture, | ||
checkForUserChangeFuture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a dependency cycle where AuthenticationControllerImpl.checkForUserChangeFuture
may try to call GlobalApplicationStateImpl.goTo
, but GlobalApplicationStateImpl.goTo
relies on the PlaceController
, which is not ready; it is initialized and set in this future's callback (on line 167 (old) / 164 (new).
We'll run the first two futures, but defer running checkForUserChangeFuture
until the placeController
is set
whenAllComplete( | ||
// Checking the session may result in a redirect, so this must be invoked after `setPlaceController` | ||
ginjector | ||
.getAuthenticationController() | ||
.getCheckForUserChangeFuture() | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using this whenAllComplete.call
pattern just the like the outer future so we can call the wrapping onFailure
method if this fails.
) | ||
.call( | ||
() -> { | ||
globalApplicationState.init( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, call globalApplicationState.init
SWC-7126
Fix bug where authenticationController might try to use placeController before it has been set