Github user neykov commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/170#discussion_r65356238
--- Diff:
camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ApplicationsYamlTest.java
---
@@ -232,6 +232,25 @@ public void
testDoesNotWrapCatalogItemAndUsesCatalogServiceName() throws Excepti
assertDoesNotWrap(app, BasicApplication.class,
"catalogServiceLevel");
}
+ @Test
+ public void testUnwrappedChildNotTagged() throws Exception {
+ addCatalogItems(
+ "brooklyn.catalog:",
+ " id: simple",
+ " version: " + TEST_VERSION,
+ " item:",
+ " type: " + BasicEntity.class.getName());
+ Entity app = createAndStartApplication(
+ "services:",
+ "- type: simple:" + TEST_VERSION);
+ Entity entity = Iterables.getOnlyElement(app.getChildren());
+
assertNull(entity.getConfig(EntityManagementUtils.WRAPPER_APP_MARKER));
+ // Note that "brooklyn.wrapper_app" will still make it into
+ // ((EntityInternal)
entity).config().getBag().getAllConfigAsConfigKeyMap();
+ // so the UI will still show the marker as inherited by the entity.
--- End diff --
`getBag()` is doing (through `EntityConfigMap`):
```
return ConfigBag.newInstanceCopying(localConfigBag)
.putAll(ownConfig)
.putIfAbsent(inheritedConfig)
.putIfAbsent(inheritedConfigBag)
.seal();
```
The problem is that `wrapper_app` in `inheritedConfig` has a generic
`ConfigKey`, not the instance from `EntityManagementUtils.WRAPPER_APP_MARKER`
so it doesn't have the inheritance value set.
---
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.
---