-
Notifications
You must be signed in to change notification settings - Fork 468
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
[WFCORE-6662] Remove deprecated usage of ServiceController.getValue() by capturing ModelControllerClientFactory ... #5834
Conversation
… by capturing ModelControllerClientFactory via ServiceActivator starting the Bootable JAR and Embedded server Jira issue: https://issues.redhat.com/browse/WFCORE-6662
Core -> Full Integration Build 13403 outcome was FAILURE using a merge of ebe0d12 Failed tests
|
@yersan Cool! I filed https://issues.redhat.com/browse/WFCORE-6659 for this and gave it a shot in 303beed, but it failed CI so I shelved it. It looks like yours here works. :) I'll review it after I get unburied a bit from PTO. |
@bstansberry oohh, I missed the https://issues.redhat.com/browse/WFCORE-6659 notification after my PTOs :( It looks like there is still some stuff to do with this PR, after taking a quick look at your changes, this one is pretty similar, although this one uses the null value on the notifier to establish when the dependent simple services that provide the (ProcessStateNotifier or ModelControllerClientFactory) are up. In your PR, you are using a Future. The This PR also assumes that there are no service reloads in between once the This PR has the issue that it is not correctly cleaning up the I think I can fix it by using the intermediate service that provides the value of those |
Partially resolved, it is still racy between the stop method and getting the values from the notifiers (it was also racy before with the original code where |
@@ -80,7 +81,8 @@ private Server(String[] cmdargs, Properties systemProps, | |||
this.systemEnv = systemEnv; | |||
this.moduleLoader = moduleLoader; | |||
this.shutdownHandler = shutdownHandler; | |||
this.clientFactorySvcCaptureRef = new AtomicReference<>(null); | |||
this.clientFactorySvcCaptureRef = new AtomicReference<>(); | |||
this.notifierRef = new AtomicReference<>(); |
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.
This shouldn't need to be a field, as its use is confined to one method and the anonymous Service impl created by a call from that method.
I initially did mine without the Future and got test failures because the getModelControllerClient() call in EmbedServerHandler.doHandle would return null. That was because the |
Yes, the createSuperUserClient call should only happen if the clientFactorySvcCaptureRef.get() doesn't return null. Note that it's ok for ModelControllerClient use to fail in the middle of a reload. If you create a client to a remote server and someone (including yourself) reloads the server, that client isn't expected to work through that. The CLI uses a client that is designed to handle that. The client we return from getModelControllerClient does as well. |
There has been no activity on this PR for 45 days. It will be auto-closed after 90 days. |
There has been no activity on this PR for 90 days and it has been closed automatically. |
...via ServiceActivator starting the Bootable JAR and Embedded server
This PR follows up on #5824, also built on top of that one.
Jira issue: https://issues.redhat.com/browse/WFCORE-6662