Github user geomacy commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/746#discussion_r127431960
--- Diff:
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBundleLoader.java
---
@@ -81,22 +91,54 @@ public CatalogBundleLoader(Predicate<Bundle>
applicationsPermitted, ManagementCo
if (null != bom) {
LOG.debug("Found catalog BOM in {} {} {}",
CatalogUtils.bundleIds(bundle));
String bomText = readBom(bom);
- String bomWithLibraryPath = addLibraryDetails(bundle, bomText);
- catalogItems =
this.managementContext.getCatalog().addItems(bomWithLibraryPath, mb);
- for (CatalogItem<?, ?> item : catalogItems) {
- LOG.debug("Added to catalog: {}, {}",
item.getSymbolicName(), item.getVersion());
+ if (mb==null) {
+ LOG.warn("Bundle "+bundle+" containing BOM is not managed
by Brooklyn; using legacy item installation");
+ legacy = true;
+ }
+ if (legacy) {
--- End diff --
With the removal of the `CatalogBomScanner` I think the `legacy` parameter
in this method's signature can be removed. This is the interesting case where
the code still calls the traditional catalog `addItems()` in the case where
there is no managed bundle known in Brooklyn's management context. I'm
wondering if this is still a path we need to support, or whether in fact now
that the scanner is removed we can just call `addTypesFromBundleBom` in all
cases within this method.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---