You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Zameer Manji <zm...@apache.org> on 2016/02/10 01:57:32 UTC

Review Request 43397: Reject NULL for enum values in H2.

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

Review request for Aurora, Maxim Khutornenko and Bill Farner.


Repository: aurora


Description
-------

While I was working on something else, I introduced an error where MyBatis was populating a thrift enum value and was reading in NULL. I realized that the code would currently treat this as enum value 0 and mask the error. This patch modifies the schema and TEnum type handler to reject populating a thrift enum value from NULL.


Diffs
-----

  src/main/java/org/apache/aurora/scheduler/storage/db/typehandlers/AbstractTEnumTypeHandler.java 892af5ddfa973148d7ae778af83c1357a23aef6a 
  src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql 7fbdcbf50fca7e974e56ed27a91ec682c6c8c3c2 
  src/test/java/org/apache/aurora/scheduler/cron/quartz/CronIT.java 3ce78e355368acb539cd374638be665535bbfd4a 

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


Testing
-------

./gradlew build -Pq
e2e tests


Thanks,

Zameer Manji


Re: Review Request 43397: Reject NULL for enum values in H2.

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


Ship it!




Ship It!

- Bill Farner


On Feb. 9, 2016, 4:57 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43397/
> -----------------------------------------------------------
> 
> (Updated Feb. 9, 2016, 4:57 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> While I was working on something else, I introduced an error where MyBatis was populating a thrift enum value and was reading in NULL. I realized that the code would currently treat this as enum value 0 and mask the error. This patch modifies the schema and TEnum type handler to reject populating a thrift enum value from NULL.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/typehandlers/AbstractTEnumTypeHandler.java 892af5ddfa973148d7ae778af83c1357a23aef6a 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql 7fbdcbf50fca7e974e56ed27a91ec682c6c8c3c2 
>   src/test/java/org/apache/aurora/scheduler/cron/quartz/CronIT.java 3ce78e355368acb539cd374638be665535bbfd4a 
> 
> Diff: https://reviews.apache.org/r/43397/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build -Pq
> e2e tests
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 43397: Reject NULL for enum values in H2.

Posted by Maxim Khutornenko <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43397/#review118557
-----------------------------------------------------------


Ship it!




Ship It!

- Maxim Khutornenko


On Feb. 10, 2016, 12:57 a.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43397/
> -----------------------------------------------------------
> 
> (Updated Feb. 10, 2016, 12:57 a.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> While I was working on something else, I introduced an error where MyBatis was populating a thrift enum value and was reading in NULL. I realized that the code would currently treat this as enum value 0 and mask the error. This patch modifies the schema and TEnum type handler to reject populating a thrift enum value from NULL.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/typehandlers/AbstractTEnumTypeHandler.java 892af5ddfa973148d7ae778af83c1357a23aef6a 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql 7fbdcbf50fca7e974e56ed27a91ec682c6c8c3c2 
>   src/test/java/org/apache/aurora/scheduler/cron/quartz/CronIT.java 3ce78e355368acb539cd374638be665535bbfd4a 
> 
> Diff: https://reviews.apache.org/r/43397/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build -Pq
> e2e tests
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 43397: Reject NULL for enum values in H2.

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


Ship it!




Master (ec0f38a) 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 Feb. 10, 2016, 12:57 a.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43397/
> -----------------------------------------------------------
> 
> (Updated Feb. 10, 2016, 12:57 a.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> While I was working on something else, I introduced an error where MyBatis was populating a thrift enum value and was reading in NULL. I realized that the code would currently treat this as enum value 0 and mask the error. This patch modifies the schema and TEnum type handler to reject populating a thrift enum value from NULL.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/typehandlers/AbstractTEnumTypeHandler.java 892af5ddfa973148d7ae778af83c1357a23aef6a 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql 7fbdcbf50fca7e974e56ed27a91ec682c6c8c3c2 
>   src/test/java/org/apache/aurora/scheduler/cron/quartz/CronIT.java 3ce78e355368acb539cd374638be665535bbfd4a 
> 
> Diff: https://reviews.apache.org/r/43397/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build -Pq
> e2e tests
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>