You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by John Sirois <js...@apache.org> on 2016/04/10 22:57:38 UTC

Review Request 45992: Make `ServerSet.JSON_CODEC` robust to errors.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45992/
-----------------------------------------------------------

Review request for Aurora, Bill Farner and Zameer Manji.


Bugs: AURORA-1468
    https://issues.apache.org/jira/browse/AURORA-1468


Repository: aurora


Description
-------

Previously bad or partial input (deserialize), and errors writing output
(serialize) could throw exceptions not matching the `Codec` contract.
Factor the codec into its own top-level class to allow testing the
serialization failure case and expand coverage to include bad inputs.

 build.gradle                                                                                        |   2 +
 commons/src/main/java/org/apache/aurora/common/zookeeper/JsonCodec.java                             | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++
 commons/src/main/java/org/apache/aurora/common/zookeeper/ServerSet.java                             |  78 +---------------------------
 commons/src/test/java/org/apache/aurora/common/zookeeper/{ServerSetTest.java => JsonCodecTest.java} |  79 ++++++++++++++++++++++++++--
 4 files changed, 218 insertions(+), 80 deletions(-)


Diffs
-----

  build.gradle fc61adfcbaf12c8ea45f71c7efe69d4fe39597c6 
  commons/src/main/java/org/apache/aurora/common/zookeeper/JsonCodec.java PRE-CREATION 
  commons/src/main/java/org/apache/aurora/common/zookeeper/ServerSet.java 2d978c1e492caea562a093ee0e6630fd219f7a3b 
  commons/src/test/java/org/apache/aurora/common/zookeeper/ServerSetTest.java b48c1f1fe3070e42f6e1e86833791ce8da2bc317 

Diff: https://reviews.apache.org/r/45992/diff/


Testing
-------

Locally green: `./gradlew -Pq build`.


Thanks,

John Sirois


Re: Review Request 45992: Make `ServerSet.JSON_CODEC` robust to errors.

Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45992/#review128163
-----------------------------------------------------------


Ship it!




Ship It!

- Bill Farner


On April 10, 2016, 1:57 p.m., John Sirois wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45992/
> -----------------------------------------------------------
> 
> (Updated April 10, 2016, 1:57 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Bugs: AURORA-1468
>     https://issues.apache.org/jira/browse/AURORA-1468
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Previously bad or partial input (deserialize), and errors writing output
> (serialize) could throw exceptions not matching the `Codec` contract.
> Factor the codec into its own top-level class to allow testing the
> serialization failure case and expand coverage to include bad inputs.
> 
>  build.gradle                                                                                        |   2 +
>  commons/src/main/java/org/apache/aurora/common/zookeeper/JsonCodec.java                             | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  commons/src/main/java/org/apache/aurora/common/zookeeper/ServerSet.java                             |  78 +---------------------------
>  commons/src/test/java/org/apache/aurora/common/zookeeper/{ServerSetTest.java => JsonCodecTest.java} |  79 ++++++++++++++++++++++++++--
>  4 files changed, 218 insertions(+), 80 deletions(-)
> 
> 
> Diffs
> -----
> 
>   build.gradle fc61adfcbaf12c8ea45f71c7efe69d4fe39597c6 
>   commons/src/main/java/org/apache/aurora/common/zookeeper/JsonCodec.java PRE-CREATION 
>   commons/src/main/java/org/apache/aurora/common/zookeeper/ServerSet.java 2d978c1e492caea562a093ee0e6630fd219f7a3b 
>   commons/src/test/java/org/apache/aurora/common/zookeeper/ServerSetTest.java b48c1f1fe3070e42f6e1e86833791ce8da2bc317 
> 
> Diff: https://reviews.apache.org/r/45992/diff/
> 
> 
> Testing
> -------
> 
> Locally green: `./gradlew -Pq build`.
> 
> 
> Thanks,
> 
> John Sirois
> 
>


Re: Review Request 45992: Make `ServerSet.JSON_CODEC` robust to errors.

Posted by John Sirois <js...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45992/#review128045
-----------------------------------------------------------



Noticed the issues with the old implementation trying to add a test for deserialization failure to https://reviews.apache.org/r/45902

- John Sirois


On April 10, 2016, 2:57 p.m., John Sirois wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45992/
> -----------------------------------------------------------
> 
> (Updated April 10, 2016, 2:57 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Bugs: AURORA-1468
>     https://issues.apache.org/jira/browse/AURORA-1468
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Previously bad or partial input (deserialize), and errors writing output
> (serialize) could throw exceptions not matching the `Codec` contract.
> Factor the codec into its own top-level class to allow testing the
> serialization failure case and expand coverage to include bad inputs.
> 
>  build.gradle                                                                                        |   2 +
>  commons/src/main/java/org/apache/aurora/common/zookeeper/JsonCodec.java                             | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  commons/src/main/java/org/apache/aurora/common/zookeeper/ServerSet.java                             |  78 +---------------------------
>  commons/src/test/java/org/apache/aurora/common/zookeeper/{ServerSetTest.java => JsonCodecTest.java} |  79 ++++++++++++++++++++++++++--
>  4 files changed, 218 insertions(+), 80 deletions(-)
> 
> 
> Diffs
> -----
> 
>   build.gradle fc61adfcbaf12c8ea45f71c7efe69d4fe39597c6 
>   commons/src/main/java/org/apache/aurora/common/zookeeper/JsonCodec.java PRE-CREATION 
>   commons/src/main/java/org/apache/aurora/common/zookeeper/ServerSet.java 2d978c1e492caea562a093ee0e6630fd219f7a3b 
>   commons/src/test/java/org/apache/aurora/common/zookeeper/ServerSetTest.java b48c1f1fe3070e42f6e1e86833791ce8da2bc317 
> 
> Diff: https://reviews.apache.org/r/45992/diff/
> 
> 
> Testing
> -------
> 
> Locally green: `./gradlew -Pq build`.
> 
> 
> Thanks,
> 
> John Sirois
> 
>


Re: Review Request 45992: Make `ServerSet.JSON_CODEC` robust to errors.

Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45992/#review128174
-----------------------------------------------------------


Ship it!




Ship It!

- Zameer Manji


On April 10, 2016, 1:57 p.m., John Sirois wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45992/
> -----------------------------------------------------------
> 
> (Updated April 10, 2016, 1:57 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Bugs: AURORA-1468
>     https://issues.apache.org/jira/browse/AURORA-1468
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Previously bad or partial input (deserialize), and errors writing output
> (serialize) could throw exceptions not matching the `Codec` contract.
> Factor the codec into its own top-level class to allow testing the
> serialization failure case and expand coverage to include bad inputs.
> 
>  build.gradle                                                                                        |   2 +
>  commons/src/main/java/org/apache/aurora/common/zookeeper/JsonCodec.java                             | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  commons/src/main/java/org/apache/aurora/common/zookeeper/ServerSet.java                             |  78 +---------------------------
>  commons/src/test/java/org/apache/aurora/common/zookeeper/{ServerSetTest.java => JsonCodecTest.java} |  79 ++++++++++++++++++++++++++--
>  4 files changed, 218 insertions(+), 80 deletions(-)
> 
> 
> Diffs
> -----
> 
>   build.gradle fc61adfcbaf12c8ea45f71c7efe69d4fe39597c6 
>   commons/src/main/java/org/apache/aurora/common/zookeeper/JsonCodec.java PRE-CREATION 
>   commons/src/main/java/org/apache/aurora/common/zookeeper/ServerSet.java 2d978c1e492caea562a093ee0e6630fd219f7a3b 
>   commons/src/test/java/org/apache/aurora/common/zookeeper/ServerSetTest.java b48c1f1fe3070e42f6e1e86833791ce8da2bc317 
> 
> Diff: https://reviews.apache.org/r/45992/diff/
> 
> 
> Testing
> -------
> 
> Locally green: `./gradlew -Pq build`.
> 
> 
> Thanks,
> 
> John Sirois
> 
>


Re: Review Request 45992: Make `ServerSet.JSON_CODEC` robust to errors.

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45992/#review128047
-----------------------------------------------------------


Ship it!




Master (0dd096d) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On April 10, 2016, 8:57 p.m., John Sirois wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45992/
> -----------------------------------------------------------
> 
> (Updated April 10, 2016, 8:57 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Bugs: AURORA-1468
>     https://issues.apache.org/jira/browse/AURORA-1468
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Previously bad or partial input (deserialize), and errors writing output
> (serialize) could throw exceptions not matching the `Codec` contract.
> Factor the codec into its own top-level class to allow testing the
> serialization failure case and expand coverage to include bad inputs.
> 
>  build.gradle                                                                                        |   2 +
>  commons/src/main/java/org/apache/aurora/common/zookeeper/JsonCodec.java                             | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  commons/src/main/java/org/apache/aurora/common/zookeeper/ServerSet.java                             |  78 +---------------------------
>  commons/src/test/java/org/apache/aurora/common/zookeeper/{ServerSetTest.java => JsonCodecTest.java} |  79 ++++++++++++++++++++++++++--
>  4 files changed, 218 insertions(+), 80 deletions(-)
> 
> 
> Diffs
> -----
> 
>   build.gradle fc61adfcbaf12c8ea45f71c7efe69d4fe39597c6 
>   commons/src/main/java/org/apache/aurora/common/zookeeper/JsonCodec.java PRE-CREATION 
>   commons/src/main/java/org/apache/aurora/common/zookeeper/ServerSet.java 2d978c1e492caea562a093ee0e6630fd219f7a3b 
>   commons/src/test/java/org/apache/aurora/common/zookeeper/ServerSetTest.java b48c1f1fe3070e42f6e1e86833791ce8da2bc317 
> 
> Diff: https://reviews.apache.org/r/45992/diff/
> 
> 
> Testing
> -------
> 
> Locally green: `./gradlew -Pq build`.
> 
> 
> Thanks,
> 
> John Sirois
> 
>