You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2020/09/07 08:59:05 UTC
[GitHub] [brooklyn-server] ahgittin opened a new pull request #1108: Unwrap entity specs when used from the DSL
ahgittin opened a new pull request #1108:
URL: https://github.com/apache/brooklyn-server/pull/1108
At present if you refer to an entity which is trivially wrapped to make an application, in a `$brooklyn:entitySpec` DSL, the application is added without being unwrapped. This is inconsistent with behaviour elsewhere, eg in the UI for "add child" and when a trivially-app-wrapped entity is referred to in `brooklyn.children`.
(FYI a "trivially-app-wrapped" entity is what you get if you say `services: [ { type: my-entity } ]` or in other places where an entity is supplied but the code needs an application and so constructs a trivial BasicApplication instance with the entity as a child.)
This PR corrects the above behaviour, so that eg such a trivially-wrapped-app can be used in a dynamic cluster and the entity is used as the spec, not the application.
Note that it is straightforward to suppress this unwrapping, just add a no-op initializer or enricher to the `Application`, and that will always prevent unwrapping.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] duncangrant commented on pull request #1108: Unwrap entity specs when used from the DSL
Posted by GitBox <gi...@apache.org>.
duncangrant commented on pull request #1108:
URL: https://github.com/apache/brooklyn-server/pull/1108#issuecomment-690086771
I've tested this in a few scenarios and works well - thanks @ahgittin
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] duncangrant merged pull request #1108: Unwrap entity specs when used from the DSL
Posted by GitBox <gi...@apache.org>.
duncangrant merged pull request #1108:
URL: https://github.com/apache/brooklyn-server/pull/1108
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org