Skip to content

ATLAS-5029 : Connected export : When multiple entities are exported ,… #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mandarambawane
Copy link
Contributor

… not all of its connected entities are exported

What changes were proposed in this pull request?

(Please fill in changes proposed in this fix. Create an issue in ASF JIRA before opening a pull request and
set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. ATLAS-XXXX: Fix a typo in YYY))

How was this patch tested?

(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

… not all of its connected entities are exported
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses an issue with exporting connected entities where not all related entities were properly exported. It adds new tests in ExportServiceTest.java to cover connected export scenarios and introduces logic changes in ExportService.java and RelationshipAttributesExtractor.java to better handle the starting entity in the export process.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java Adds new tests and data provider to verify connected export behavior and proper import processing via ImportService.
repository/src/main/java/org/apache/atlas/repository/impexp/RelationshipAttributesExtractor.java Updates connected fetch logic to exclude the starting entity from duplicate processing.
repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java Introduces a startingEntityGuid to resume processing for the starting entity and adjusts the export traversal loop accordingly.
Comments suppressed due to low confidence (2)

repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java:292

  • Consider adding an inline comment here explaining the purpose of the resumeExportForStartingEntity flag to enhance code clarity during export processing of the starting entity.
if ((context.fetchType == ExportFetchType.CONNECTED ...

repository/src/main/java/org/apache/atlas/repository/impexp/RelationshipAttributesExtractor.java:56

  • [nitpick] A short comment explaining the rationale behind resetting the traversal direction for the starting entity could improve clarity for reviewers and maintainers.
if (context.startingEntityGuid.equals(entity.getGuid())) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants