You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2017/02/16 14:14:06 UTC

[GitHub] brooklyn-server pull request #562: Provide a scratchpad area per management ...

GitHub user neykov opened a pull request:

    https://github.com/apache/brooklyn-server/pull/562

    Provide a scratchpad area per management context

    Replaces similar usage of `ManagementContext.getConfig()`.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/neykov/brooklyn-server scratchpad

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/562.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 #562
    
----
commit fc6047c1a85ddf721c77ac70adc6e771ad0a0b61
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date:   2017-02-16T14:11:09Z

    Provide a scratchpad area per management context

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server pull request #562: Provide a scratchpad area per management ...

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/562#discussion_r101565527
  
    --- Diff: camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/CampPlatformWithJustBrooklynMgmt.java ---
    @@ -30,7 +30,9 @@
     
         public CampPlatformWithJustBrooklynMgmt(ManagementContext mgmt) {
             this.mgmt = mgmt;
    +        // Deprecated in 0.11.0. Add to release notes and remove in next release.
    --- End diff --
    
    maybe tweak the comment to clarify that it is the `use of getConfig().put() on the following line` that is deprecated in favour of the use of the scratchpad. (and same goes for similar comments elsewhere)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #562: Provide a scratchpad area per management context

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-server/pull/562
  
    @geomacy Addressed comments, can you take another look.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #562: Provide a scratchpad area per management context

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-server/pull/562
  
    Good idea about a limited interface @geomacy. If you look at the change sites you'll find out that a `context` is hard to identify. On the other hand using a `ConfigKey` for the key gives you a pretty good idea what the value is. Perhaps I should enforce the use of `ConfigKeys` in the interface.
    
    @tbouron I share your concerns so I added https://github.com/apache/brooklyn-docs/pull/150 as well. There are (still) valid uses of `put` on `BrooklynProperties` left in the code base so would be careful with adding logging there. Also it will start logging for the backwards compatibility changes which is also not a great UX.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #562: Provide a scratchpad area per management context

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-server/pull/562
  
    Good point about casts, updated.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server pull request #562: Provide a scratchpad area per management ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-server/pull/562


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #562: Provide a scratchpad area per management context

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on the issue:

    https://github.com/apache/brooklyn-server/pull/562
  
    \U0001f44d  lgtm, merging


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server pull request #562: Provide a scratchpad area per management ...

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/562#discussion_r103490624
  
    --- Diff: camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/BrooklynCampPlatform.java ---
    @@ -65,7 +65,7 @@ public BrooklynCampPlatform(PlatformRootSummary root, ManagementContext manageme
     
         /** finds and returns the {@link CampPlatform} registered for the management context, or null if none */
         @Nullable public static CampPlatform findPlatform(ManagementContext mgmt) {
    -        return mgmt.getConfig().getConfig(BrooklynCampConstants.CAMP_PLATFORM);
    +        return (CampPlatform) mgmt.getScratchpad().get(BrooklynCampConstants.CAMP_PLATFORM);
    --- End diff --
    
    Don't need the cast, here and elsewhere.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #562: Provide a scratchpad area per management context

Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on the issue:

    https://github.com/apache/brooklyn-server/pull/562
  
    @neykov Agree, having this warning within the docs seems to be the way to go.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---