You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by ahgittin <gi...@git.apache.org> on 2014/09/10 23:17:25 UTC

[GitHub] incubator-brooklyn pull request: serialize any objects as json, fa...

GitHub user ahgittin opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/159

    serialize any objects as json, falling back to an object containing toString and error message if the object is not properly serializable

    needed because the result of the "stop" effector is not json-serializable, causing activity calls (and view) to blow up when we invoke stop

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

    $ git pull https://github.com/ahgittin/incubator-brooklyn json-serialize-anything

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

    https://github.com/apache/incubator-brooklyn/pull/159.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 #159
    
----
commit 8a8879d4c6e5e08ab6d703c51109ed982d6a8872
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Date:   2014-09-10T21:13:44Z

    serialize any objects as json, falling back to an object containing toString and error message if the object is not properly serializable

----


---
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] incubator-brooklyn pull request: [WIP] serialize any objects as js...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/159#issuecomment-55267926
  
    just discovered that some things still create infinite loops, viz `LoadBalancer.PORT_NUMBER_SENSOR`:
    
        public static final BasicAttributeSensorAndConfigKey<AttributeSensor> PORT_NUMBER_SENSOR = new BasicAttributeSensorAndConfigKey<AttributeSensor>(
                AttributeSensor.class, "member.sensor.portNumber", "Port number sensor on members (defaults to http.port; not supported in all implementations)", Attributes.HTTP_PORT);
    
    causes:
    
    ```
    "member.sensor.portNumber":{"typeToken":
    {"array":false,"primitive":false,"componentType":null,"type":"java.lang.Integer","rawType":"java.lang.Integer","types":
    [{"array":false,"primitive":false,"componentType":null,"type":"java.lang.Integer","rawType":"java.lang.Integer","types":
    [{"array":false,"primitive":false,"componentType":null,"type":"java.lang.Integer","rawType":"java.lang.Integer","types":
    [{"array":false,"primitive":false,"componentType":null,"type":"java.lang.Integer","rawType":"java.lang.Integer","types":
    [{"array":false,"primitive":false,"componentType":null,"type":"java.lang.Integer","rawType":"java.lang.Integer","types":
    [{"array":false,
    ```


---
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] incubator-brooklyn pull request: serialize any objects as json, fa...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/159#issuecomment-55894679
  
    have manually pushed the one additional commit (it's minor JS stuff)


---
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] incubator-brooklyn pull request: serialize any objects as json, fa...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/159#issuecomment-55478419
  
    last commit fixes the infinite loop and overall give much better serialization.  (wasn't easy!)
    
    couple other minor tidies too
    
    ready for review


---
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] incubator-brooklyn pull request: serialize any objects as json, fa...

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

    https://github.com/apache/incubator-brooklyn/pull/159


---
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] incubator-brooklyn pull request: serialize any objects as json, fa...

Posted by andreaturli <gi...@git.apache.org>.
Github user andreaturli commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/159#issuecomment-55892704
  
    ok, lgtm
    
    Tests are green


---
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.
---