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

2024-04-08 Thread Priyanshi Shah

---
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 differentchangeMarker 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 
3aa24 


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

2024-04-08 Thread Priyanshi Shah

---
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 differentchangeMarker 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 
3aa24 


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



[jira] [Updated] (ATLAS-4845) Atlas Import is failing with fetchType: Incremental if there are no changes between two consecutive runs

2024-04-08 Thread Priyanshi Shah (Jira)


 [ 
https://issues.apache.org/jira/browse/ATLAS-4845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Priyanshi Shah updated ATLAS-4845:
--
Attachment: (was: ATLAS-4845.patch)

> Atlas Import is failing with fetchType: Incremental if there are no changes 
> between two consecutive runs
> 
>
> Key: ATLAS-4845
> URL: https://issues.apache.org/jira/browse/ATLAS-4845
> Project: Atlas
>  Issue Type: Bug
>  Components:  atlas-core
>Reporter: Priyanshi Shah
>Assignee: Priyanshi Shah
>Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)