You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Priyanshi Shah <pr...@freestoneinfotech.com> on 2024/04/02 14:50:27 UTC

Review Request 74951: ATLAS-4845 : Atlas Import is failing with fetchType: Incremental if there are no changes between two consecutive runs

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

Review request for atlas, Jayendra Parab, Mandar Ambawane, Pinal Shah, and Sheetal Shah.


Bugs: ATLAS-4845
    https://issues.apache.org/jira/browse/ATLAS-4845


Repository: atlas


Description
-------

Steps:

1. First export and import with changeMarker “0” - worked as expected.
2. Try to run 2nd export + import without any changes in atlas, 2nd export also worked and gave different        changeMarker in output as expected.

Expectation: 

a) Empty zip should be created if no entities is fetched.

Problem:

2nd Import is getting failed.

Solution:

1. Earlier export zip was created with default json files like atlas-export-info.json, atlas-export-order.json and atlas-typesdef.json when though no entities was fetched and hence, while performing import opertaion failure was seen with Empty Zip File exception.
2. Now, the problem is fixed by returning empty zip files if no entities was fetched and the status code is set to 204.


Diffs
-----

  repository/src/main/java/org/apache/atlas/repository/impexp/ZipSink.java 5cec39dd6 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3a7777a24 


Diff: https://reviews.apache.org/r/74951/diff/1/


Testing
-------

Manual testing for the same has been performed.

PC is also successfull.

https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1589/


Thanks,

Priyanshi Shah


Re: Review Request 74951: ATLAS-4845 : Atlas Import is failing with fetchType: Incremental if there are no changes between two consecutive runs

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74951/#review226373
-----------------------------------------------------------


Ship it!




Ship It!

- Mandar Ambawane


On April 2, 2024, 2:50 p.m., Priyanshi Shah wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74951/
> -----------------------------------------------------------
> 
> (Updated April 2, 2024, 2:50 p.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Mandar Ambawane, Pinal Shah, and Sheetal Shah.
> 
> 
> Bugs: ATLAS-4845
>     https://issues.apache.org/jira/browse/ATLAS-4845
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Steps:
> 
> 1. First export and import with changeMarker “0” - worked as expected.
> 2. Try to run 2nd export + import without any changes in atlas, 2nd export also worked and gave different        changeMarker in output as expected.
> 
> Expectation: 
> 
> a) Empty zip should be created if no entities is fetched.
> 
> Problem:
> 
> 2nd Import is getting failed.
> 
> Solution:
> 
> 1. Earlier export zip was created with default json files like atlas-export-info.json, atlas-export-order.json and atlas-typesdef.json when though no entities was fetched and hence, while performing import opertaion failure was seen with Empty Zip File exception.
> 2. Now, the problem is fixed by returning empty zip files if no entities was fetched and the status code is set to 204.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ZipSink.java 5cec39dd6 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3a7777a24 
> 
> 
> Diff: https://reviews.apache.org/r/74951/diff/1/
> 
> 
> Testing
> -------
> 
> Manual testing for the same has been performed.
> 
> PC is also successfull.
> 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1589/
> 
> 
> Thanks,
> 
> Priyanshi Shah
> 
>


Re: Review Request 74951: ATLAS-4845 : Atlas Import is failing with fetchType: Incremental if there are no changes between two consecutive runs

Posted by Sheetal Shah <sh...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74951/#review226374
-----------------------------------------------------------



As per the changes in this patch, in case if no entities are found in the export, the export service will respond with an empty zip file with no files within and status code 204.

Contradicting to this, behaviour as seen in the previous version for similar case of empty export is such :  The export API call returns 3 json files (atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) in the zip output response with response code 200 and operation status "FAIL"

Remark : Backward compatibility needs to be taken care of while handling empty export/zero delta for incremental export. Also,
Operation Status to be marked as SUCCESS for every successful execution (even if there are no entities found for any request) unless there occurs any exception/error in the flow

Suggestion : Make the changes based on a flag/setting which indicates an empty export; like so : omitZipResponseForEmptyExport ; the content-type in the response may also need to be set acccordingly

- Sheetal Shah


On April 2, 2024, 8:20 p.m., Priyanshi Shah wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74951/
> -----------------------------------------------------------
> 
> (Updated April 2, 2024, 8:20 p.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Mandar Ambawane, Pinal Shah, and Sheetal Shah.
> 
> 
> Bugs: ATLAS-4845
>     https://issues.apache.org/jira/browse/ATLAS-4845
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Steps:
> 
> 1. First export and import with changeMarker “0” - worked as expected.
> 2. Try to run 2nd export + import without any changes in atlas, 2nd export also worked and gave different        changeMarker in output as expected.
> 
> Expectation: 
> 
> a) Empty zip should be created if no entities is fetched.
> 
> Problem:
> 
> 2nd Import is getting failed.
> 
> Solution:
> 
> 1. Earlier export zip was created with default json files like atlas-export-info.json, atlas-export-order.json and atlas-typesdef.json when though no entities was fetched and hence, while performing import opertaion failure was seen with Empty Zip File exception.
> 2. Now, the problem is fixed by returning empty zip files if no entities was fetched and the status code is set to 204.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ZipSink.java 5cec39dd6 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3a7777a24 
> 
> 
> Diff: https://reviews.apache.org/r/74951/diff/1/
> 
> 
> Testing
> -------
> 
> Manual testing for the same has been performed.
> 
> PC is also successfull.
> 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1589/
> 
> 
> Thanks,
> 
> Priyanshi Shah
> 
>


Re: Review Request 74951: ATLAS-4845 : Atlas Import is failing with fetchType: Incremental if there are no changes between two consecutive runs

Posted by Pinal Shah <pi...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74951/#review226385
-----------------------------------------------------------


Ship it!




Ship It!

- Pinal Shah


On April 9, 2024, 1:14 p.m., Priyanshi Shah wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74951/
> -----------------------------------------------------------
> 
> (Updated April 9, 2024, 1:14 p.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Mandar Ambawane, Pinal Shah, and Sheetal Shah.
> 
> 
> Bugs: ATLAS-4845
>     https://issues.apache.org/jira/browse/ATLAS-4845
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Steps:
> 
> 1. First export and import with changeMarker “0” - worked as expected.
> 2. Try to run 2nd export + import without any changes in atlas, 2nd export also worked and gave different        changeMarker in output as expected.
> 
> Expectation: 
> 
> a) Empty zip should be created if no entities is fetched.
> 
> Problem:
> 
> Export zip file was created with three json files(atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) even though no entities was fetched and hence, while importing these zip files the import was getting failed.
> 
> Solution:
> 
> 1. The flag "omitZipResponseForEmptyExport" has been created which will indicate whether to create an empty zip or not when no entities are fetched during export operation. This flag is introduced to support backward compatibility for export operation. The default value of this flag is false.
> 2. If the "omitZipResponseForEmptyExport" flag is set to true and if no entities are fetched during export, an empty zip file is created with status code 204. Otherwise, if the flag value is false zip file is created with 3 json files (atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) with status code as 200.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java b03b386c0 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ZipSink.java 5cec39dd6 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3a7777a24 
> 
> 
> Diff: https://reviews.apache.org/r/74951/diff/2/
> 
> 
> Testing
> -------
> 
> Manual testing for the same has been performed.
> 
> PC is also successfull.
> 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1603/
> 
> 
> Thanks,
> 
> Priyanshi Shah
> 
>


Re: Review Request 74951: ATLAS-4845 : Atlas Import is failing with fetchType: Incremental if there are no changes between two consecutive runs

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74951/#review226384
-----------------------------------------------------------


Ship it!




Ship It!

- Mandar Ambawane


On April 9, 2024, 1:14 p.m., Priyanshi Shah wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74951/
> -----------------------------------------------------------
> 
> (Updated April 9, 2024, 1:14 p.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Mandar Ambawane, Pinal Shah, and Sheetal Shah.
> 
> 
> Bugs: ATLAS-4845
>     https://issues.apache.org/jira/browse/ATLAS-4845
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Steps:
> 
> 1. First export and import with changeMarker “0” - worked as expected.
> 2. Try to run 2nd export + import without any changes in atlas, 2nd export also worked and gave different        changeMarker in output as expected.
> 
> Expectation: 
> 
> a) Empty zip should be created if no entities is fetched.
> 
> Problem:
> 
> Export zip file was created with three json files(atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) even though no entities was fetched and hence, while importing these zip files the import was getting failed.
> 
> Solution:
> 
> 1. The flag "omitZipResponseForEmptyExport" has been created which will indicate whether to create an empty zip or not when no entities are fetched during export operation. This flag is introduced to support backward compatibility for export operation. The default value of this flag is false.
> 2. If the "omitZipResponseForEmptyExport" flag is set to true and if no entities are fetched during export, an empty zip file is created with status code 204. Otherwise, if the flag value is false zip file is created with 3 json files (atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) with status code as 200.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java b03b386c0 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ZipSink.java 5cec39dd6 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3a7777a24 
> 
> 
> Diff: https://reviews.apache.org/r/74951/diff/2/
> 
> 
> Testing
> -------
> 
> Manual testing for the same has been performed.
> 
> PC is also successfull.
> 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1603/
> 
> 
> Thanks,
> 
> Priyanshi Shah
> 
>


Re: Review Request 74951: ATLAS-4845 : Atlas Import is failing with fetchType: Incremental if there are no changes between two consecutive runs

Posted by Priyanshi Shah <pr...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74951/
-----------------------------------------------------------

(Updated April 9, 2024, 1:14 p.m.)


Review request for atlas, Jayendra Parab, Mandar Ambawane, Pinal Shah, and Sheetal Shah.


Bugs: ATLAS-4845
    https://issues.apache.org/jira/browse/ATLAS-4845


Repository: atlas


Description
-------

Steps:

1. First export and import with changeMarker “0” - worked as expected.
2. Try to run 2nd export + import without any changes in atlas, 2nd export also worked and gave different        changeMarker in output as expected.

Expectation: 

a) Empty zip should be created if no entities is fetched.

Problem:

Export zip file was created with three json files(atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) even though no entities was fetched and hence, while importing these zip files the import was getting failed.

Solution:

1. The flag "omitZipResponseForEmptyExport" has been created which will indicate whether to create an empty zip or not when no entities are fetched during export operation. This flag is introduced to support backward compatibility for export operation. The default value of this flag is false.
2. If the "omitZipResponseForEmptyExport" flag is set to true and if no entities are fetched during export, an empty zip file is created with status code 204. Otherwise, if the flag value is false zip file is created with 3 json files (atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) with status code as 200.


Diffs
-----

  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java b03b386c0 
  repository/src/main/java/org/apache/atlas/repository/impexp/ZipSink.java 5cec39dd6 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3a7777a24 


Diff: https://reviews.apache.org/r/74951/diff/2/


Testing (updated)
-------

Manual testing for the same has been performed.

PC is also successfull.

https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1603/


Thanks,

Priyanshi Shah


Re: Review Request 74951: ATLAS-4845 : Atlas Import is failing with fetchType: Incremental if there are no changes between two consecutive runs

Posted by Priyanshi Shah <pr...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74951/
-----------------------------------------------------------

(Updated April 9, 2024, 5:05 a.m.)


Review request for atlas, Jayendra Parab, Mandar Ambawane, Pinal Shah, and Sheetal Shah.


Bugs: ATLAS-4845
    https://issues.apache.org/jira/browse/ATLAS-4845


Repository: atlas


Description
-------

Steps:

1. First export and import with changeMarker “0” - worked as expected.
2. Try to run 2nd export + import without any changes in atlas, 2nd export also worked and gave different        changeMarker in output as expected.

Expectation: 

a) Empty zip should be created if no entities is fetched.

Problem:

Export zip file was created with three json files(atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) even though no entities was fetched and hence, while importing these zip files the import was getting failed.

Solution:

1. The flag "omitZipResponseForEmptyExport" has been created which will indicate whether to create an empty zip or not when no entities are fetched during export operation. This flag is introduced to support backward compatibility for export operation. The default value of this flag is false.
2. If the "omitZipResponseForEmptyExport" flag is set to true and if no entities are fetched during export, an empty zip file is created with status code 204. Otherwise, if the flag value is false zip file is created with 3 json files (atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) with status code as 200.


Diffs (updated)
-----

  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java b03b386c0 
  repository/src/main/java/org/apache/atlas/repository/impexp/ZipSink.java 5cec39dd6 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3a7777a24 


Diff: https://reviews.apache.org/r/74951/diff/2/

Changes: https://reviews.apache.org/r/74951/diff/1-2/


Testing
-------

Manual testing for the same has been performed.

PC is also successfull.

https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1589/


Thanks,

Priyanshi Shah


Re: Review Request 74951: ATLAS-4845 : Atlas Import is failing with fetchType: Incremental if there are no changes between two consecutive runs

Posted by Priyanshi Shah <pr...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74951/
-----------------------------------------------------------

(Updated April 8, 2024, 1:35 p.m.)


Review request for atlas, Jayendra Parab, Mandar Ambawane, Pinal Shah, and Sheetal Shah.


Bugs: ATLAS-4845
    https://issues.apache.org/jira/browse/ATLAS-4845


Repository: atlas


Description (updated)
-------

Steps:

1. First export and import with changeMarker “0” - worked as expected.
2. Try to run 2nd export + import without any changes in atlas, 2nd export also worked and gave different        changeMarker in output as expected.

Expectation: 

a) Empty zip should be created if no entities is fetched.

Problem:

Export zip file was created with three json files(atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) even though no entities was fetched and hence, while importing these zip files the import was getting failed.

Solution:

1. The flag "omitZipResponseForEmptyExport" has been created which will indicate whether to create an empty zip or not when no entities are fetched during export operation. This flag is introduced to support backward compatibility for export operation. The default value of this flag is false.
2. If the "omitZipResponseForEmptyExport" flag is set to true and if no entities are fetched during export, an empty zip file is created with status code 204. Otherwise, if the flag value is false zip file is created with 3 json files (atlas-typesdef.json, atlas-export-order.json and atlas-export-info.json) with status code as 200.


Diffs
-----

  repository/src/main/java/org/apache/atlas/repository/impexp/ZipSink.java 5cec39dd6 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3a7777a24 


Diff: https://reviews.apache.org/r/74951/diff/1/


Testing
-------

Manual testing for the same has been performed.

PC is also successfull.

https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1589/


Thanks,

Priyanshi Shah