-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Remove CompletableFuture from SSLConfigurationReloader #93132
Remove CompletableFuture from SSLConfigurationReloader #93132
Conversation
The `SSLConfigurationReloader` uses a `CompletableFuture` to receive an as-yet-unconstructed instance of the `SSLService`, but in all cases the `SSLService` is in fact already constructed so we can just directly pass it into the constructor.
Pinging @elastic/es-security (Team:Security) |
@DaveCTurner I think this could potentially re-introduce the issue fixed by #54999 (see also #54867). In summary, the use of the future isn't because SslService being unavailable but to ensure update to relevant SSL files are always handled. |
I see. This is pretty trappy, and doesn't seem to be covered by a test? Even a comment would have helped. Ok, I'll do something different here. |
Thanks @ywangd, this is ready for another look |
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.
LGTM
This is pretty trappy, and doesn't seem to be covered by a test? Even a comment would have helped.
Yeah I agree a comment would have been good. It does have a test. But due to the racing nature and how close the two statements are at each other (with no place to inject something in between), it happens only very rarely so that the test is not guaranteed to fail when the main code changes. It's more of a best effort.
👍 I see, thanks Yang |
Replaced with a
PlainActionFuture
, since it is never completed exceptionally.