Review Request 68863: ZipSourec: Elegant handling of Empty Zip
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68863/ --- Review request for atlas and Madhan Neethiraj. Bugs: ATLAS-2897 https://issues.apache.org/jira/browse/ATLAS-2897 Repository: atlas Description --- **Approach** - Detect empty zip case and explicitly throw an exception. **CURL** curl -g -X POST -u admin:admin -H "Content-Type: multipart/form-data" -H "Cache-Control: no-cache" -F data=@../docs/stocks_dw-1.1.zip "http://localhost:21000/api/atlas/admin/import"; Following error message is displayed: ``` {"errorCode":"ATLAS-500-00-001","errorMessage":"org.apache.atlas.exception.AtlasBaseException: Attempting to import empty ZIP."} ``` Diffs - repository/src/test/resources/empty.zip PRE-CREATION Diff: https://reviews.apache.org/r/68863/diff/1/ Testing --- **Unit tests** Additional test. **Functional tests** Via REST calls. File Attachments empty zip https://reviews.apache.org/media/uploaded/files/2018/09/27/41c59b64-4461-4fb1-ac05-4f3009f2d3f1__stocks_dw-1.1.zip Thanks, Ashutosh Mestry
Re: Review Request 68863: ZipSourec: Elegant handling of Empty Zip
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68863/ --- (Updated Sept. 27, 2018, 4:29 p.m.) Review request for atlas and Madhan Neethiraj. Changes --- Updates include: Uploaded patch with source files. Bugs: ATLAS-2897 https://issues.apache.org/jira/browse/ATLAS-2897 Repository: atlas Description --- **Approach** - Detect empty zip case and explicitly throw an exception. **CURL** curl -g -X POST -u admin:admin -H "Content-Type: multipart/form-data" -H "Cache-Control: no-cache" -F data=@../docs/stocks_dw-1.1.zip "http://localhost:21000/api/atlas/admin/import"; Following error message is displayed: ``` {"errorCode":"ATLAS-500-00-001","errorMessage":"org.apache.atlas.exception.AtlasBaseException: Attempting to import empty ZIP."} ``` Diffs (updated) - repository/src/main/java/org/apache/atlas/repository/impexp/ZipSource.java 7d960447e repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java b556fe9fd repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java 720aa144f repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java 1c1c68f35 repository/src/test/resources/empty.zip PRE-CREATION Diff: https://reviews.apache.org/r/68863/diff/3/ Changes: https://reviews.apache.org/r/68863/diff/2-3/ Testing --- **Unit tests** Additional test. **Functional tests** Via REST calls. File Attachments empty zip https://reviews.apache.org/media/uploaded/files/2018/09/27/41c59b64-4461-4fb1-ac05-4f3009f2d3f1__stocks_dw-1.1.zip Thanks, Ashutosh Mestry
Re: Review Request 68863: ZipSourec: Elegant handling of Empty Zip
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68863/#review209073 --- Ship it! Ship It! - Madhan Neethiraj On Sept. 27, 2018, 4:29 p.m., Ashutosh Mestry wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68863/ > --- > > (Updated Sept. 27, 2018, 4:29 p.m.) > > > Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath > Subramanian. > > > Bugs: ATLAS-2897 > https://issues.apache.org/jira/browse/ATLAS-2897 > > > Repository: atlas > > > Description > --- > > **Approach** > - Detect empty zip case and explicitly throw an exception. > > **CURL** > curl -g -X POST -u admin:admin -H "Content-Type: multipart/form-data" -H > "Cache-Control: no-cache" -F data=@../docs/stocks_dw-1.1.zip > "http://localhost:21000/api/atlas/admin/import"; > > Following error message is displayed: > ``` > {"errorCode":"ATLAS-500-00-001","errorMessage":"org.apache.atlas.exception.AtlasBaseException: > Attempting to import empty ZIP."} > ``` > > > Diffs > - > > repository/src/main/java/org/apache/atlas/repository/impexp/ZipSource.java > 7d960447e > > repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java > b556fe9fd > > repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java > 720aa144f > > repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java > 1c1c68f35 > repository/src/test/resources/empty.zip PRE-CREATION > > > Diff: https://reviews.apache.org/r/68863/diff/3/ > > > Testing > --- > > **Unit tests** > Additional test. > > **Functional tests** > Via REST calls. > > > File Attachments > > > empty zip > > https://reviews.apache.org/media/uploaded/files/2018/09/27/41c59b64-4461-4fb1-ac05-4f3009f2d3f1__stocks_dw-1.1.zip > > > Thanks, > > Ashutosh Mestry > >
Re: Review Request 68863: ZipSourec: Elegant handling of Empty Zip
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68863/#review209079 --- Ship it! Ship It! - Sarath Subramanian On Sept. 27, 2018, 9:29 a.m., Ashutosh Mestry wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68863/ > --- > > (Updated Sept. 27, 2018, 9:29 a.m.) > > > Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath > Subramanian. > > > Bugs: ATLAS-2897 > https://issues.apache.org/jira/browse/ATLAS-2897 > > > Repository: atlas > > > Description > --- > > **Approach** > - Detect empty zip case and explicitly throw an exception. > > **CURL** > curl -g -X POST -u admin:admin -H "Content-Type: multipart/form-data" -H > "Cache-Control: no-cache" -F data=@../docs/stocks_dw-1.1.zip > "http://localhost:21000/api/atlas/admin/import"; > > Following error message is displayed: > ``` > {"errorCode":"ATLAS-500-00-001","errorMessage":"org.apache.atlas.exception.AtlasBaseException: > Attempting to import empty ZIP."} > ``` > > > Diffs > - > > repository/src/main/java/org/apache/atlas/repository/impexp/ZipSource.java > 7d960447e > > repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java > b556fe9fd > > repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java > 720aa144f > > repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java > 1c1c68f35 > repository/src/test/resources/empty.zip PRE-CREATION > > > Diff: https://reviews.apache.org/r/68863/diff/3/ > > > Testing > --- > > **Unit tests** > Additional test. > > **Functional tests** > Via REST calls. > > > File Attachments > > > empty zip > > https://reviews.apache.org/media/uploaded/files/2018/09/27/41c59b64-4461-4fb1-ac05-4f3009f2d3f1__stocks_dw-1.1.zip > > > Thanks, > > Ashutosh Mestry > >