Use Uni to resolve TenantContextConfig #13121
Merged
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.
Fixes #12754
Fixes #13040
This PR is big enough but it simply properly addresses #12754 with the help from Clement. So in this PR:
TenantConfigContext
is resolved as Uni in OidcRecorder which avoids various blocked Vert.x issues when OIDC connections are established dynamically and also should make it faster since only part of the call runs on the executor thread. This is why PR affects so much code as nowUni<TenantConfigContext>
gets transformed into another Uni completing the call.DefaultTenantConfigResolver
: 1) instead ofresolve(vertxContext, true/false)
it is now eitherresolveConfig
orresolveTenant
2) isBlocking has been moved out which now only blocks if user info or refreshing the tokens is required (this will be optimized to the just in time blocking call) 3) updated it to avoid calling the resolvers more than once during the current requestI hope it make it to 10.0.0.CR1 as it has to settle a bit and it brings some good improvements
CC @cescoffier