You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by aledsage <gi...@git.apache.org> on 2017/09/27 14:05:20 UTC
[GitHub] brooklyn-server pull request #847: Catalog init refactor
GitHub user aledsage opened a pull request:
https://github.com/apache/brooklyn-server/pull/847
Catalog init refactor
Builds on code tidy/deletions in https://github.com/apache/brooklyn-server/pull/846. Please review/merge that first, and then I'll rebase this. Only the final commit in this PR needs reviewed separately.
Move catalog init code to `CatalogInitialization`
Move code from `RebindIteration` so it delegates everything to the `CatalogInitialization`.
Just refactors (no change in behaviour).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aledsage/brooklyn-server catalog-init-refactor
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/847.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 #847
----
commit c8cc5520995f42eb87477cc4c66288c60c2db3a7
Author: Aled Sage <al...@gmail.com>
Date: 2017-09-26T11:32:20Z
Delete deprecated CatalogLoadMode
commit adfe684630a33f6934399c44db59b2a6874af893
Author: Aled Sage <al...@gmail.com>
Date: 2017-09-26T11:36:32Z
Delete deprecated RebindManager.rebind() methods
commit 88ac951800efa755896fad53e032fb636781e760
Author: Aled Sage <al...@gmail.com>
Date: 2017-09-26T11:40:26Z
Delete `--catalogReset` from classic mode
commit b2bee5b55998add78bb344f552b2fd91303c5c55
Author: Aled Sage <al...@gmail.com>
Date: 2017-09-26T11:51:42Z
Delete `--catalogAdd` from classic mode
Also delete `--catalogForce` (which only applied to the catalogAdd items)
commit 31b0a833be86e6fa7879e2042387aa3dae6e3189
Author: Aled Sage <al...@gmail.com>
Date: 2017-09-26T11:57:16Z
Delete deprecated RebindManager.forcePersistNow()
commit 596a8355733edd8080b3f3ceea8cbda2569395cd
Author: Aled Sage <al...@gmail.com>
Date: 2017-09-26T12:14:11Z
Delete deprecated ImmediateDeltaChangeListener
commit 0a5c19c3dabf64fcd9c50a7427d392bff9898cf2
Author: Aled Sage <al...@gmail.com>
Date: 2017-09-26T12:16:04Z
Delete deprecated RebindManagerImpl.setPeriodicPersistPeriod(long)
commit e596e29f8c82ca665c1223abce34525d004652a0
Author: Aled Sage <al...@gmail.com>
Date: 2017-09-26T12:20:41Z
BasicEntityMemento: fix getting config keys
commit 19bf0075c843c83b6f9164601efc405daa0da302
Author: Aled Sage <al...@gmail.com>
Date: 2017-09-26T12:21:01Z
MementosGenerator: fix use of deprecated code
commit 2a4900e99830af36c70e41d47d97ebf47c0a5f02
Author: Aled Sage <al...@gmail.com>
Date: 2017-09-27T14:02:33Z
Move catalog init code to CatalogInitialization
Move code from `RebindIteration` so it delegates everything to the
CatalogInitialization.
Just refactors (no change in behaviour).
----
---
[GitHub] brooklyn-server issue #847: Catalog init refactor
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:
https://github.com/apache/brooklyn-server/pull/847
Thanks @m4rkmckenna - full stacktrace from log on jenkins is shown below. I don't think it's related to this PR, but I'll fix it here.
```
2017-10-02 05:16:31,175 INFO TESTNG FAILED: "Surefire test" - org.apache.brooklyn.util.core.ClassLoaderUtilsTest.testLoadClassInOsgiCore() finished in 32 ms
java.lang.IllegalStateException: Bundle BasicManagedBundle{symbolicName=null, version=null, url=system:file:/home/jenkins/jenkins-slave/workspace/brooklyn-server-pull-requests%402/core/target/classes/} failed preparation: Error creating ZIP from classpath spec file:/home/jenkins/jenkins-slave/workspace/brooklyn-server-pull-requests%402/core/target/classes/: StringIndexOutOfBoundsException: String index out of range: -1
at org.apache.brooklyn.core.mgmt.ha.OsgiArchiveInstaller.install(OsgiArchiveInstaller.java:643)
at org.apache.brooklyn.core.mgmt.ha.OsgiManager.installDeferredStart(OsgiManager.java:359)
at org.apache.brooklyn.core.catalog.internal.CatalogUtils.installLibraries(CatalogUtils.java:191)
at org.apache.brooklyn.core.catalog.internal.BasicBrooklynCatalog.addItem(BasicBrooklynCatalog.java:1805)
at org.apache.brooklyn.util.core.ClassLoaderUtilsTest.createSimpleEntity(ClassLoaderUtilsTest.java:393)
at org.apache.brooklyn.util.core.ClassLoaderUtilsTest.testLoadClassInOsgiCore(ClassLoaderUtilsTest.java:221)
Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error creating ZIP from classpath spec file:/home/jenkins/jenkins-slave/workspace/brooklyn-server-pull-requests%402/core/target/classes/: StringIndexOutOfBoundsException: String index out of range: -1
at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:180)
at org.apache.brooklyn.util.exceptions.Exceptions.propagateAnnotated(Exceptions.java:160)
at org.apache.brooklyn.util.core.osgi.BundleMaker.createJarFromClasspathDir(BundleMaker.java:118)
at org.apache.brooklyn.core.mgmt.ha.OsgiArchiveInstaller.makeLocalZipFileFromInputStreamOrUrl(OsgiArchiveInstaller.java:222)
at org.apache.brooklyn.core.mgmt.ha.OsgiArchiveInstaller.install(OsgiArchiveInstaller.java:351)
... 34 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1931)
at org.apache.brooklyn.util.core.osgi.BundleMaker.addUrlFileToZip(BundleMaker.java:362)
at org.apache.brooklyn.util.core.osgi.BundleMaker.addUrlItemRecursively(BundleMaker.java:307)
at org.apache.brooklyn.util.core.osgi.BundleMaker.createJarFromClasspathDir(BundleMaker.java:107)
... 36 more
```
---
[GitHub] brooklyn-server issue #847: Catalog init refactor
Posted by m4rkmckenna <gi...@git.apache.org>.
Github user m4rkmckenna commented on the issue:
https://github.com/apache/brooklyn-server/pull/847
@aledsage Failure looks related
```
testLoadClassInOsgiCore(org.apache.brooklyn.util.core.ClassLoaderUtilsTest) Time elapsed: 0.088 sec <<< FAILURE!
java.lang.IllegalStateException: Bundle BasicManagedBundle{symbolicName=null, version=null, url=system:file:/home/jenkins/jenkins-slave/workspace/brooklyn-server-pull-requests%402/core/target/classes/} failed preparation: Error creating ZIP from classpath spec file:/home/jenkins/jenkins-slave/workspace/brooklyn-server-pull-requests%402/core/target/classes/: StringIndexOutOfBoundsException: String index out of range: -1
at org.apache.brooklyn.util.core.ClassLoaderUtilsTest.createSimpleEntity(ClassLoaderUtilsTest.java:393)
at org.apache.brooklyn.util.core.ClassLoaderUtilsTest.testLoadClassInOsgiCore(ClassLoaderUtilsTest.java:221)
Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error creating ZIP from classpath spec file:/home/jenkins/jenkins-slave/workspace/brooklyn-server-pull-requests%402/core/target/classes/
at org.apache.brooklyn.util.core.ClassLoaderUtilsTest.createSimpleEntity(ClassLoaderUtilsTest.java:393)
at org.apache.brooklyn.util.core.ClassLoaderUtilsTest.testLoadClassInOsgiCore(ClassLoaderUtilsTest.java:221)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at org.apache.brooklyn.util.core.ClassLoaderUtilsTest.createSimpleEntity(ClassLoaderUtilsTest.java:393)
at org.apache.brooklyn.util.core.ClassLoaderUtilsTest.testLoadClassInOsgiCore(ClassLoaderUtilsTest.java:221)
```
---
[GitHub] brooklyn-server pull request #847: Catalog init refactor
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/brooklyn-server/pull/847
---
[GitHub] brooklyn-server issue #847: Catalog init refactor
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:
https://github.com/apache/brooklyn-server/pull/847
Fix for `BundleMaker` is in a separate PR: https://github.com/apache/brooklyn-server/pull/850
---
[GitHub] brooklyn-server issue #847: Catalog init refactor
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:
https://github.com/apache/brooklyn-server/pull/847
retest this please
---