Skip to content
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

MESH-316 | Supporting Unarchiving of Products #3958

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

Conversation

ankitpatnaik-atlan
Copy link
Collaborator

@ankitpatnaik-atlan ankitpatnaik-atlan commented Jan 9, 2025

Change description

When certain assets are deleted/removed from a product , the edge between the asset and product is softDeleted i.e the edge is never completely removed only the relationshipAttribute of the edge with the product is marked as DELETED. This becomes a problem when the product is archived because while archiving a product all the existing edges are softDeleted. Now there is no way to differentiate between an asset which was intentionally deleted/removed by the end user and the assets which were removed during archiving. When the product is unarchived all the softDeleted edges become ACTIVE and we end up with redundant edges. In this PR I introduced a hard deletion logic while removing edges to resolve the problem and for existing products I have added the APIs for the migration.

JIRA.

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Development

  • Lint rules pass locally
  • Application changes have been tested thoroughly
  • Automated tests covering modified code pass

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Code review

  • Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
  • "Ready for review" label attached and reviewers assigned
  • Changes have been reviewed by at least one other contributor
  • Pull request linked to task tracker where applicable

@@ -195,6 +195,7 @@ public class EntityGraphMapper {
private final EntityGraphRetriever retrieverNoRelation;

private static final Set<String> excludedTypes = new HashSet<>(Arrays.asList(TYPE_GLOSSARY, TYPE_CATEGORY, TYPE_TERM, TYPE_PRODUCT, TYPE_DOMAIN));
private static final Set<String> edgeLabelsForHardDeletion = new HashSet<>(Arrays.asList(OUTPUT_PORT_PRODUCT_EDGE_LABEL, INPUT_PORT_PRODUCT_EDGE_LABEL));

Choose a reason for hiding this comment

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

Please make a list of all relationships that Product have today, we will decide on what relations we will do hard delete. Mostly for all we will do hard delete, but make a list of relationships first and then we can decide. This edgeLabelsForHardDeletion list will inlude all those lables that we decide to hard delete

Choose a reason for hiding this comment

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

This is not resolved yet because there will be some other relations like terms as well which will need hard delete

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