You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by sjcorbett <gi...@git.apache.org> on 2018/01/18 17:32:26 UTC
[GitHub] brooklyn-server pull request #936: Update Reflections dependency
GitHub user sjcorbett opened a pull request:
https://github.com/apache/brooklyn-server/pull/936
Update Reflections dependency
0.9.9-RC1 is unable to read classes containing lambda functions. This meant that `brooklyn list-objects` did not output all classes. Refer to ronmamo/reflections#15 for futher context.
There is a more recent release of reflections that I think fixes further issues (see GitHub) but it relies on Guava v20. ronmamo/reflections#194
Reflections' dependency on com.google.code.findbugs:annotations is excluded because it clashes with a version from airline and should only be needed at compile time anyway.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sjcorbett/brooklyn-server reflections
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/936.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 #936
----
commit d03eccb6553b18627c430268f9d826d5d9284ac9
Author: Sam Corbett <sa...@...>
Date: 2018-01-18T17:17:09Z
Delete useless method call in ServiceStateLogic
newEnricherForServiceUpFromChildren returns a spec which is unused.
commit 69e4b15b1ca0c743c6f74b829f74c49879f0bc6c
Author: Sam Corbett <sa...@...>
Date: 2018-01-18T17:30:57Z
Update reflections dependency to 0.9.10
0.9.9-RC1 is unable to read classes containing lambda functions. This
meant that `brooklyn list-objects` did not output all classes. Refer to
https://github.com/ronmamo/reflections/issues/15 for futher context.
There is a more recent release of reflections that I think fixes further
issues (see GitHub) but it relies on Guava v20.
https://github.com/ronmamo/reflections/issues/194
Reflections' dependency on com.google.code.findbugs:annotations is
excluded because it clashes with a version from airline and should only
be needed at compile time anyway.
----
---
[GitHub] brooklyn-server issue #936: Update Reflections dependency
Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the issue:
https://github.com/apache/brooklyn-server/pull/936
The default behaviour of the `getTypesAnnotatedWith` method in reflections was flipped in 0.9.10 to include unannotated classes that implement annotated interfaces. This meant that the Brooklyn catalogue contained entity implementation classes as well their definition interfaces, and thus the test failures.
I've modified Brooklyn's `ReflectionScanner` to tell reflections to behave as it did before.
See reflections issue 137 for more detail.
---
[GitHub] brooklyn-server issue #936: Update Reflections dependency
Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on the issue:
https://github.com/apache/brooklyn-server/pull/936
all checks passed 🥇 , will merge it
---
[GitHub] brooklyn-server pull request #936: Update Reflections dependency
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/brooklyn-server/pull/936
---
[GitHub] brooklyn-server issue #936: Update Reflections dependency
Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on the issue:
https://github.com/apache/brooklyn-server/pull/936
Looks like these tests are catching some different behaviour - on master, from `BundleAndTypeResourcesTest#testFilterListOfEntitiesByName`, from the code
```
List<TypeSummary> entities = client().path("/catalog/types")
.query("fragment", "vaNIllasOFTWAREpROCESS").get(new GenericType<List<TypeSummary>>() {});
log.info("Matching entities: " + entities);
assertEquals(entities.size(), 1);
```
I get
```
2018-01-19 11:01:05,319 INFO Matching entities: [TypeSummary[org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess:0.0.0-SNAPSHOT, containingBundle=brooklyn-catalog-bom-yOHyKxk9:0.0.0-SNAPSHOT, kind=SPEC, displayName=Vanilla Software Process]]
```
whereas in this branch it gives
```
2018-01-19 10:39:58,713 INFO Matching entities: [TypeSummary[org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess:0.0.0-SNAPSHOT, containingBundle=brooklyn-catalog-bom-N5sHOvLj:0.0.0-SNAPSHOT, kind=SPEC, displayName=Vanilla Software Process], TypeSummary[org.apache.brooklyn.entity.software.base.VanillaSoftwareProcessImpl:0.0.0-SNAPSHOT, containingBundle=brooklyn-catalog-bom-N5sHOvLj:0.0.0-SNAPSHOT, kind=SPEC, displayName=VanillaSoftwareProcessImpl]]
```
i.e. finding the `VanillaSoftwareProcessImpl` too.
---