-
Notifications
You must be signed in to change notification settings - Fork 36
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
Move default behavior into library #323
Conversation
Make code reuseable and reduce complexity of minimal example (defaultoperator). Make leader election optional by making it not the default implementation, but a optional class.
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.
Hi @sgraband , thanks for the refactoring! It already looks pretty good to me. I have two remarks inline. Please have a look :)
...loud.operator/src/main/java/org/eclipse/theia/cloud/operator/AbstractTheiaCloudOperator.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/eclipse/theia/cloud/operator/LeaderElectionTheiaCloudOperatorLauncher.java
Outdated
Show resolved
Hide resolved
Also remove the abstract so it can directly be used. Use it directly in the DefaultTheiaCloudOperatorModule. Remove the DefaultTheiaCloudOperator as it is no longer needed. Extract LeaderElection in separate method for easier customization. Also make the other methods in the leader election protected.
@lucas-koehler Thanks for the feedback. I incorporated both of your suggestions. Let me know what you think. |
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.
Thanks for the updates! LGTM now ✨
@jfaltermeier Do you want to take a look as well? |
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
Make code reuseable and reduce complexity of minimal example (defaultoperator).
Make leader election optional by making it not the default implementation, but a optional class.
Note: This is just a proposal, please feel free to comment if you would like to structure this differently or have any other objections.