-
Notifications
You must be signed in to change notification settings - Fork 314
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
Better OSGi support #269
Better OSGi support #269
Conversation
@lburgazzoli i took a quick glance of the code. it seems to me there are lot of code changes in different areas
is it possible to submit separate standalone pr for each? in that way, it can help better to understand all the changes happening in the pr. |
@fanminshi I can try to split it into different PRs but not sure if I can make it soon. Most of the code changes are just code relocation:
The main changes apply to the POMs to properly configure OSGi stuffs and ion particular to jetcd-all which is now used as OSGi bundle as workaround for the following grpg-java issue with module systems: |
@@ -87,7 +87,7 @@ docker run \ | |||
--name etcd-ssl \ | |||
--hostname etcd-ssl \ | |||
--network etcd \ | |||
--volume $CERT_HOME:/etc/ssl/etcd \ | |||
--volume $CERT_HOME:/etc/ssl/etcd:Z \ |
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.
what's Z
option for?
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.
Z is for SElinux, it should jave no effects on systems were SELinux is disabled
* limitations under the License. | ||
*/ | ||
|
||
package com.coreos.jetcd.all; |
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.
new line?
|
||
<feature prerequisite="true">wrap</feature> | ||
|
||
<!-- google --> |
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.
why is this commented out? prefer codebase to be as minimum as possible.
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 is left as documentation to show how the karaf feature should looks like once grpc solves the split package issue
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.
i see. Could you add comment to explain the intention?
@@ -50,7 +48,7 @@ | |||
ENV.put("java.naming.provider.url", "dns:"); | |||
} | |||
|
|||
private ConcurrentMap<String, EquivalentAddressGroup> cache; | |||
private ConcurrentMap<String, SocketAddress> cache; |
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.
why changing EquivalentAddressGroup
to SocketAddress
?
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.
To reduce packages inter dependencies among OSGi bundles
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.
got it.
@@ -31,7 +29,7 @@ public void testDefaults() throws Exception { | |||
final URIResolverLoader loader = URIResolverLoader.defaultLoader(); | |||
final SmartNameResolver resolver = new SmartNameResolver("etcd", Collections.emptyList(), loader); | |||
|
|||
assertThat(resolver.getResolvers().stream().anyMatch(DirectUriResolver.class::isInstance)).isTrue(); | |||
Assertions.assertThat(resolver.getResolvers().stream().anyMatch(DirectUriResolver.class::isInstance)).isTrue(); |
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.
any reason on changing imports to import org.assertj.core.api.Assertions
?
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.
No done intentionally, guess the IDE did it while refactoring. Will fix it
@lburgazzoli looks good in general. I quickly studied osgi and gain an general idea on your osgi implementation. it would be better if someone with more expertise can also review the osgi part of code. also the ci is broken. could you check upon that. |
14bf338
to
be9a6f4
Compare
@fanminshi I'm having some issues ot understand why the OSGi tests fails on travis-ci but not locally and I do not have time to digg into further so would it be ok if I mark as @ignored OSGi tests for the moment ? I'd like to get this PR merged asap so it does not diverge too much from master. |
@lburgazzoli I understand your concern. I usually don't want to merge anything that has potential bug whether it is ci or code itself. Is there a rush in pushing osgi support in? afaik, not many changes are being pushed into jetcd. I think you are safe from worrying about pr diverging. Could we get another week or two of debugging. I might take a look as well. If we can't figure out by then, we can the pr with @ignored test option. |
Yeah I have no issue to wait some more weeks. In fact my main goal is to get jetcd in apache-camel and OSGi support is definitively something that would be more that welcome. |
3ce39ab
to
371c2fb
Compare
@fanminshi I disabled the test because I have very little time at the moment to digg into it and it should be an issue with temporary directories or ports as there's no other reason to have such a different behavior, I 'll have a further look as soon as possible but it would be nice if we can get this merged. |
@fanminshi I've rebased against latest master, can we get this merged ? |
yeah, let's get this merged. |
I found several diffs on changing |
This PR is aimed to improve JEtcd OSGi support and includes the following changes to the current projects:
Some more work may be needed but I'd like to get this merged so people can test it.