You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2016/03/10 18:51:16 UTC
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
GitHub user neykov opened a pull request:
https://github.com/apache/brooklyn-server/pull/56
[OSGi] Enable Swagger
Note that this PR bumps the guava version, so might need wider community discussion!
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/neykov/brooklyn-server osgi/swagger
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/56.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #56
----
commit 84e845c02c325984b8109f26e26a54f741385d65
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date: 2016-03-10T15:25:48Z
Bump Felix version to the one used in Karaf
commit b35267bf2fecec9169a27acc686987eda6cb23af
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date: 2016-03-10T15:26:39Z
Add swagger as a rest endpoint
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:
https://github.com/apache/brooklyn-server/pull/56#issuecomment-195304238
Forcing a rebuild.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:
https://github.com/apache/brooklyn-server/pull/56#issuecomment-202456707
this conflicts w #55 but it's easy to resolve; done so in https://github.com/ahgittin/brooklyn-server/commit/b49bb07cd35eaba6a5762de1c3f988d9239de613 (which i will use when we merge this)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:
https://github.com/apache/brooklyn-server/pull/56#issuecomment-197852227
Loading both guava 17 & guava 18 worked out fine, sticking to this solution.
Leaving brooklyn to depend on 17.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:
https://github.com/apache/brooklyn-server/pull/56#issuecomment-195273274
test failure looks related:
```
2016-03-11 08:40:51,463 INFO TESTNG FAILED: "Surefire test" - org.apache.brooklyn.core.mgmt.osgi.OsgiVersionMoreEntityTest.testMoreEntitiesV2FailsWithoutBasicTestOsgiEntitiesBundle() finished in 47 ms
java.lang.AssertionError: Missing expected text in error: org.apache.brooklyn.util.exceptions.CompoundRuntimeException: Unable to instantiate org.apache.brooklyn.test.osgi.entities.more.MoreEntity; 2 errors including: Transformer for java-type-name gave an error creating this plan: Unable to load org.apache.brooklyn.test.osgi.entities.more.MoreEntity from [OSGi:org.apache.brooklyn.test.osgi.entities.more.MoreEntity:0.1.0[[CatalogBundleDto{symbolicName=null, version=null, url=classpath:/brooklyn/osgi/brooklyn-test-osgi-more-entities_0.2.0.jar}]]]: Unable to resolve class org.apache.brooklyn.test.osgi.entities.more.MoreEntity in CatalogBundleDto{symbolicName=null, version=null, url=classpath:/brooklyn/osgi/brooklyn-test-osgi-more-entities_0.2.0.jar}: ClassNotFoundException: org.apache.brooklyn.test.osgi.entities.more.MoreEntity: BundleException: Unable to resolve org.apache.brooklyn.test.resources.osgi.brooklyn-test-osgi-more-entities [44](R 44.0): missing requirement [org.apache.b
rooklyn.test.resources.osgi.brooklyn-test-osgi-more-entities [44](R 44.0)] osgi.wiring.package; (osgi.wiring.package=org.apache.brooklyn.test.osgi.entities) Unresolved requirements: [[org.apache.brooklyn.test.resources.osgi.brooklyn-test-osgi-more-entities [44](R 44.0)] osgi.wiring.package; (osgi.wiring.package=org.apache.brooklyn.test.osgi.entities)]: ClassNotFoundException: org.apache.brooklyn.test.osgi.entities.more.MoreEntity expected [true] but found [false]
at org.apache.brooklyn.core.mgmt.osgi.OsgiVersionMoreEntityTest.testMoreEntitiesV2FailsWithoutBasicTestOsgiEntitiesBundle(OsgiVersionMoreEntityTest.java:285)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/56#discussion_r57585442
--- Diff: utils/rest-swagger/pom.xml ---
@@ -85,80 +76,19 @@
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </exclusion>
</exclusions>
</dependency>
+
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
+ <groupId>org.apache.brooklyn</groupId>
+ <artifactId>brooklyn-test-support</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
</dependency>
</dependencies>
-
- <build>
- <plugins>
- <!-- <plugin>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <artifactSet>
- <includes>
- <include>io.swagger:swagger-core</include>
- <include>io.swagger:swagger-jaxrs</include>
- </includes>
- </artifactSet>
- <finalName>${project.artifactId}-${project.version}-with-swagger</finalName>
- <outputFile>${project.build.directory}/${project.artifactId}-shaded-${project.version}.jar</outputFile>
- </configuration>
- </execution>
- </executions>
- </plugin>-->
- <plugin>
- <groupId>org.apache.felix</groupId>
--- End diff --
nice that this can be removed now
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:
https://github.com/apache/brooklyn-server/pull/56#issuecomment-202473461
Yes, guava is included and swagger works with the newer version.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:
https://github.com/apache/brooklyn-server/pull/56#issuecomment-197808496
Re guava version change - haven't looked at the specific API changes between versions, but would expect that they would lead to a compile error if something used by Brooklyn changed. Will take a look at the release notes to confirm.
I suggest that we follow the jclouds lead and stick to the least common denominator API between guava versions. Then we can leave the v17 dependency in the pom, but load 16-18 in Karaf, as we see fit.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:
https://github.com/apache/brooklyn-server/pull/56#issuecomment-195303898
Had the same failure this morning, but after pulling latest changes and rebuilding it went away.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:
https://github.com/apache/brooklyn-server/pull/56#issuecomment-202451060
is guava 18 included in the osgi build? maybe worth a check it's not being too smart and trying to fetch that from the internet if not in the local maven cache.
alternatively does the swagger stuff work w the same version as brooklyn?
apart from that looks good
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:
https://github.com/apache/brooklyn-server/pull/56#issuecomment-195271264
Apart from guava and felix version bumps this looks good. Felix version bump seems fine. Guava however...
Have you checked what from 16 (jclouds) and 17 (brooklyn) is incompatible with 18 (swagger) -- or even 19 (latest) ?
Alternatively it looks like the deps in the `rest-swagger/pom.xml` pointing at brooklyn are never used. So maybe we could remove them altogether and in the OSGi build allow it to take the guava version it wants even if different to the version brooklyn uses. (This strategy is probably more important for jclouds -- and if we had jclouds getting the guava bundle version it wants I'd be relaxed about Brooklyn taking any version.)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/brooklyn-server/pull/56
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request: [OSGi] Enable Swagger
Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:
https://github.com/apache/brooklyn-server/pull/56#issuecomment-195276712
simple to fix, i guess the felix error messages have changed.
change `OsgiVersionMoreEntityTest:282` from
try {
Entity me = addItemFromCatalog(c2);
Assert.fail("Should have failed, with unresolved dependency; instead got "+me);
} catch (Exception e) {
Assert.assertTrue(e.toString().toLowerCase().contains("unresolved constraint"), "Missing expected text in error: "+e);
Assert.assertTrue(e.toString().toLowerCase().contains("wiring.package"), "Missing expected text in error: "+e);
Assert.assertTrue(e.toString().toLowerCase().contains("org.apache.brooklyn.test.osgi.entities"), "Missing expected text in error: "+e);
}
to
try {
Entity me = addItemFromCatalog(c2);
Asserts.shouldHaveFailedPreviously("Should have failed, with unresolved dependency; instead got: "+me);
} catch (Exception e) {
Asserts.expectedFailureContainsIgnoreCase(e, "unresolved", "wiring.package", "org.apache.brooklyn.test.osgi.entities");
}
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---