From a924064c09418856a9a13d80bb32a7b1cc02933e Mon Sep 17 00:00:00 2001 From: Sriharsha Chintalapani Date: Wed, 19 Feb 2025 20:53:08 -0800 Subject: [PATCH] Fix #17723: Generate Incremental Change Events even when consolidation of events applied (#19550) * Fix #17723: Generate Incremental Change Events even when consolidation of events applied * Fix #17723: Generate Incremental Change Events even when consolidation of events applied * fix tests * Fix tests * clean policy tests * update search methods to use incrementalChangeDescription part-1 * Fix the version page playwrights * update search methods to use incrementalChangeDescription part-2 * introduce new field incrementalChangeDescription for search part-3 * fix mvn endpoint test * fix followers and page search test * fix following of assets --------- Co-authored-by: Pere Miquel Brull Co-authored-by: sonikashah Co-authored-by: Aniket Katkar Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com> --- .../ometa/test_ometa_role_policy_api.py | 51 ++- .../java/org/openmetadata/service/Entity.java | 1 + .../jdbi3/APICollectionRepository.java | 1 - .../service/jdbi3/APIServiceRepository.java | 1 - .../jdbi3/ClassificationRepository.java | 1 - .../jdbi3/DashboardServiceRepository.java | 1 - .../service/jdbi3/DatabaseRepository.java | 1 - .../jdbi3/DatabaseSchemaRepository.java | 1 - .../jdbi3/DatabaseServiceRepository.java | 1 - .../service/jdbi3/DomainRepository.java | 1 - .../service/jdbi3/EntityRepository.java | 108 ++++-- .../service/jdbi3/GlossaryRepository.java | 1 - .../jdbi3/MessagingServiceRepository.java | 1 - .../jdbi3/MetadataServiceRepository.java | 1 - .../jdbi3/MlModelServiceRepository.java | 1 - .../jdbi3/PipelineServiceRepository.java | 1 - .../jdbi3/SearchServiceRepository.java | 1 - .../jdbi3/StorageServiceRepository.java | 1 - .../service/jdbi3/TeamRepository.java | 1 - .../service/jdbi3/TestCaseRepository.java | 1 + .../service/jdbi3/TestSuiteRepository.java | 1 - .../service/search/SearchClient.java | 18 +- .../service/search/SearchRepository.java | 146 +++++++-- .../elasticsearch/ElasticSearchClient.java | 17 +- .../service/search/indexes/SearchIndex.java | 6 +- .../service/search/models/IndexMapping.java | 6 +- .../search/opensearch/OpenSearchClient.java | 18 +- .../service/resources/EntityResourceTest.java | 308 ++++++------------ .../apis/APIEndpointResourceTest.java | 1 + .../resources/charts/ChartResourceTest.java | 22 +- .../databases/TableResourceTest.java | 94 +++--- .../domains/DataProductResourceTest.java | 20 +- .../dqtests/TestCaseResourceTest.java | 8 +- .../glossary/GlossaryTermResourceTest.java | 64 ++-- .../resources/metadata/TypeResourceTest.java | 36 +- .../pipelines/PipelineResourceTest.java | 53 ++- .../policies/PolicyResourceTest.java | 64 +--- .../storages/ContainerResourceTest.java | 33 +- .../resources/teams/RoleResourceTest.java | 6 +- .../resources/teams/TeamResourceTest.java | 5 +- .../resources/teams/UserResourceTest.java | 34 +- .../openmetadata/schema/EntityInterface.java | 4 + .../schema/analytics/webAnalyticEvent.json | 4 + .../custom/dataInsightCustomChart.json | 4 + .../schema/dataInsight/dataInsightChart.json | 4 + .../json/schema/dataInsight/kpi/kpi.json | 4 + .../json/schema/entity/applications/app.json | 4 + .../marketplace/appMarketPlaceDefinition.json | 4 + .../schema/entity/automations/workflow.json | 4 + .../resources/json/schema/entity/bot.json | 4 + .../entity/classification/classification.json | 4 + .../schema/entity/classification/tag.json | 4 + .../schema/entity/data/apiCollection.json | 4 + .../json/schema/entity/data/apiEndpoint.json | 4 + .../json/schema/entity/data/chart.json | 4 + .../json/schema/entity/data/container.json | 4 + .../json/schema/entity/data/dashboard.json | 4 + .../entity/data/dashboardDataModel.json | 4 + .../json/schema/entity/data/database.json | 4 + .../schema/entity/data/databaseSchema.json | 4 + .../json/schema/entity/data/glossary.json | 4 + .../json/schema/entity/data/glossaryTerm.json | 4 + .../json/schema/entity/data/metric.json | 4 + .../json/schema/entity/data/mlmodel.json | 4 + .../json/schema/entity/data/pipeline.json | 4 + .../json/schema/entity/data/query.json | 4 + .../json/schema/entity/data/report.json | 4 + .../json/schema/entity/data/searchIndex.json | 4 + .../schema/entity/data/storedProcedure.json | 4 + .../json/schema/entity/data/table.json | 4 + .../json/schema/entity/data/topic.json | 4 + .../json/schema/entity/docStore/document.json | 4 + .../schema/entity/domains/dataProduct.json | 4 + .../json/schema/entity/domains/domain.json | 4 + .../json/schema/entity/policies/policy.json | 4 + .../schema/entity/services/apiService.json | 4 + .../connections/testConnectionDefinition.json | 4 + .../entity/services/dashboardService.json | 4 + .../entity/services/databaseService.json | 4 + .../ingestionPipelines/ingestionPipeline.json | 4 + .../entity/services/messagingService.json | 4 + .../entity/services/metadataService.json | 4 + .../entity/services/mlmodelService.json | 4 + .../entity/services/pipelineService.json | 4 + .../schema/entity/services/searchService.json | 4 + .../entity/services/storageService.json | 4 + .../json/schema/entity/teams/persona.json | 4 + .../json/schema/entity/teams/role.json | 4 + .../json/schema/entity/teams/team.json | 4 + .../json/schema/entity/teams/user.json | 4 + .../resources/json/schema/entity/type.json | 4 + .../json/schema/events/eventSubscription.json | 4 + .../workflows/workflowDefinition.json | 4 + .../resources/json/schema/tests/testCase.json | 4 + .../json/schema/tests/testDefinition.json | 4 + .../json/schema/tests/testSuite.json | 4 + .../json/schema/type/changeEvent.json | 4 + .../json/schema/type/entityHistory.json | 33 ++ .../e2e/Features/AdvancedSearch.spec.ts | 17 +- .../ClassificationVersionPage.spec.ts | 6 +- .../VersionPages/EntityVersionPages.spec.ts | 106 +++--- .../GlossaryVersionPage.spec.ts | 6 +- .../ServiceEntityVersionPage.spec.ts | 107 +++--- .../support/entity/ApiCollectionClass.ts | 2 +- .../entity/EntityDataClass.interface.ts | 36 ++ .../support/entity/EntityDataClass.ts | 227 ++++++++++--- .../generated/analytics/webAnalyticEvent.ts | 10 +- .../custom/dataInsightCustomChart.ts | 10 +- .../generated/dataInsight/dataInsightChart.ts | 14 +- .../ui/src/generated/dataInsight/kpi/kpi.ts | 10 +- .../src/generated/entity/applications/app.ts | 10 +- .../marketplace/appMarketPlaceDefinition.ts | 10 +- .../generated/entity/automations/workflow.ts | 47 ++- .../resources/ui/src/generated/entity/bot.ts | 10 +- .../entity/classification/classification.ts | 10 +- .../generated/entity/classification/tag.ts | 10 +- .../generated/entity/data/apiCollection.ts | 10 +- .../src/generated/entity/data/apiEndpoint.ts | 10 +- .../ui/src/generated/entity/data/chart.ts | 10 +- .../ui/src/generated/entity/data/container.ts | 10 +- .../ui/src/generated/entity/data/dashboard.ts | 10 +- .../entity/data/dashboardDataModel.ts | 10 +- .../ui/src/generated/entity/data/database.ts | 6 +- .../generated/entity/data/databaseSchema.ts | 10 +- .../ui/src/generated/entity/data/glossary.ts | 10 +- .../src/generated/entity/data/glossaryTerm.ts | 10 +- .../ui/src/generated/entity/data/metric.ts | 10 +- .../ui/src/generated/entity/data/mlmodel.ts | 10 +- .../ui/src/generated/entity/data/pipeline.ts | 10 +- .../ui/src/generated/entity/data/query.ts | 10 +- .../ui/src/generated/entity/data/report.ts | 10 +- .../src/generated/entity/data/searchIndex.ts | 6 +- .../generated/entity/data/storedProcedure.ts | 10 +- .../ui/src/generated/entity/data/table.ts | 4 + .../ui/src/generated/entity/data/topic.ts | 10 +- .../src/generated/entity/docStore/document.ts | 10 +- .../generated/entity/domains/dataProduct.ts | 10 +- .../ui/src/generated/entity/domains/domain.ts | 10 +- .../src/generated/entity/policies/policy.ts | 12 +- .../generated/entity/services/apiService.ts | 10 +- .../connections/testConnectionDefinition.ts | 10 +- .../entity/services/dashboardService.ts | 10 +- .../entity/services/databaseService.ts | 17 +- .../ingestionPipelines/ingestionPipeline.ts | 10 + .../entity/services/messagingService.ts | 46 ++- .../entity/services/metadataService.ts | 10 +- .../entity/services/mlmodelService.ts | 10 +- .../entity/services/pipelineService.ts | 10 +- .../entity/services/searchService.ts | 10 +- .../entity/services/storageService.ts | 10 +- .../ui/src/generated/entity/teams/persona.ts | 6 +- .../ui/src/generated/entity/teams/role.ts | 12 +- .../ui/src/generated/entity/teams/team.ts | 10 +- .../ui/src/generated/entity/teams/user.ts | 10 +- .../resources/ui/src/generated/entity/type.ts | 10 +- .../src/generated/events/eventSubscription.ts | 6 + .../workflows/workflowDefinition.ts | 4 + .../ui/src/generated/tests/testCase.ts | 14 +- .../ui/src/generated/tests/testDefinition.ts | 10 +- .../ui/src/generated/tests/testSuite.ts | 4 + .../ui/src/generated/type/changeEvent.ts | 12 +- .../ui/src/generated/type/entityHistory.ts | 6 +- 162 files changed, 1584 insertions(+), 933 deletions(-) rename openmetadata-ui/src/main/resources/ui/playwright/e2e/{Pages => VersionPages}/GlossaryVersionPage.spec.ts (98%) create mode 100644 openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.interface.ts diff --git a/ingestion/tests/integration/ometa/test_ometa_role_policy_api.py b/ingestion/tests/integration/ometa/test_ometa_role_policy_api.py index 0819b8ca984..3787b64a8b3 100644 --- a/ingestion/tests/integration/ometa/test_ometa_role_policy_api.py +++ b/ingestion/tests/integration/ometa/test_ometa_role_policy_api.py @@ -214,17 +214,37 @@ class OMetaRolePolicyTest(TestCase): policies = cls.metadata.list_entities(entity=Policy) for policy in policies.entities: if model_str(policy.name).startswith(model_str(cls.policy_entity.name)): - cls.metadata.delete(entity=Policy, entity_id=model_str(policy.id)) + cls.metadata.delete( + entity=Policy, + entity_id=model_str(policy.id), + hard_delete=True, + recursive=True, + ) - cls.metadata.delete(entity=Policy, entity_id=model_str(cls.role_policy_1.id)) - cls.metadata.delete(entity=Policy, entity_id=model_str(cls.role_policy_2.id)) + cls.metadata.delete( + entity=Policy, + entity_id=model_str(cls.role_policy_1.id), + hard_delete=True, + recursive=True, + ) + cls.metadata.delete( + entity=Policy, + entity_id=model_str(cls.role_policy_2.id), + hard_delete=True, + recursive=True, + ) roles = cls.metadata.list_entities(entity=Role) for role in roles.entities: if model_str(role.name.root).startswith( model_str(cls.role_entity.name.root) ): - cls.metadata.delete(entity=Role, entity_id=model_str(role.id)) + cls.metadata.delete( + entity=Role, + entity_id=model_str(role.id), + hard_delete=True, + recursive=True, + ) def test_policy_create(self): """ @@ -328,7 +348,12 @@ class OMetaRolePolicyTest(TestCase): res_id = self.metadata.get_by_id(entity=Policy, entity_id=res_name.id) # Delete - self.metadata.delete(entity=Policy, entity_id=model_str(res_id.id)) + self.metadata.delete( + entity=Policy, + entity_id=model_str(res_id.id), + hard_delete=True, + recursive=True, + ) # Then we should not find it res = self.metadata.list_entities(entity=Policy) @@ -547,7 +572,9 @@ class OMetaRolePolicyTest(TestCase): res_id = self.metadata.get_by_id(entity=Role, entity_id=res_name.id) # Delete - self.metadata.delete(entity=Role, entity_id=str(res_id.id.root)) + self.metadata.delete( + entity=Role, entity_id=str(res_id.id.root), hard_delete=True, recursive=True + ) # Then we should not find it res = self.metadata.list_entities(entity=Role) @@ -626,7 +653,9 @@ class OMetaRolePolicyTest(TestCase): ) assert res.users.root[0].id == user.id - self.metadata.delete(entity=User, entity_id=user.id) + self.metadata.delete( + entity=User, entity_id=user.id, hard_delete=True, recursive=True + ) def test_role_add_team(self): """ @@ -657,8 +686,12 @@ class OMetaRolePolicyTest(TestCase): ) assert res.teams.root[0].id == team.id - self.metadata.delete(entity=Team, entity_id=team.id) - self.metadata.delete(entity=User, entity_id=user.id) + self.metadata.delete( + entity=Team, entity_id=team.id, hard_delete=True, recursive=True + ) + self.metadata.delete( + entity=User, entity_id=user.id, hard_delete=True, recursive=True + ) def test_role_patch_policies(self): """ diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/Entity.java b/openmetadata-service/src/main/java/org/openmetadata/service/Entity.java index 5b3d52970f0..344785c4d67 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/Entity.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/Entity.java @@ -111,6 +111,7 @@ public final class Entity { public static final String FIELD_DELETED = "deleted"; public static final String FIELD_PIPELINE_STATUS = "pipelineStatus"; public static final String FIELD_DISPLAY_NAME = "displayName"; + public static final String FIELD_FULLY_QUALIFIED_NAME = "fullyQualifiedName"; public static final String FIELD_EXTENSION = "extension"; public static final String FIELD_USAGE_SUMMARY = "usageSummary"; public static final String FIELD_CHILDREN = "children"; diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/APICollectionRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/APICollectionRepository.java index 2b79b32108e..74f41f4e533 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/APICollectionRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/APICollectionRepository.java @@ -39,7 +39,6 @@ public class APICollectionRepository extends EntityRepository { "", ""); supportsSearch = true; - parent = true; } @Override diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/APIServiceRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/APIServiceRepository.java index 6ea4a0f692c..5d6f9f61993 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/APIServiceRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/APIServiceRepository.java @@ -16,6 +16,5 @@ public class APIServiceRepository extends ServiceEntityRepository { quoteFqn = true; supportsSearch = true; renameAllowed = true; - parent = true; } @Override diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DashboardServiceRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DashboardServiceRepository.java index 63811a6df5b..8bf66d6e20c 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DashboardServiceRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DashboardServiceRepository.java @@ -33,6 +33,5 @@ public class DashboardServiceRepository "", ServiceType.DASHBOARD); supportsSearch = true; - parent = true; } } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseRepository.java index a0d035413f8..bcb37650a41 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseRepository.java @@ -69,7 +69,6 @@ public class DatabaseRepository extends EntityRepository { "", ""); supportsSearch = true; - parent = true; fieldFetchers.put("name", this::fetchAndSetService); } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseSchemaRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseSchemaRepository.java index a07e2f8174f..47f13e49f8b 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseSchemaRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseSchemaRepository.java @@ -74,7 +74,6 @@ public class DatabaseSchemaRepository extends EntityRepository { "", ""); supportsSearch = true; - parent = true; } @Override diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseServiceRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseServiceRepository.java index 104f9d846e2..fc4440c9525 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseServiceRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DatabaseServiceRepository.java @@ -60,7 +60,6 @@ public class DatabaseServiceRepository "", ServiceType.DATABASE); supportsSearch = true; - parent = true; } @Override diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DomainRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DomainRepository.java index 5a6f6dcca48..8615b359e98 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DomainRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/DomainRepository.java @@ -54,7 +54,6 @@ public class DomainRepository extends EntityRepository { UPDATE_FIELDS, UPDATE_FIELDS); supportsSearch = true; - parent = true; } @Override diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java index cbb7bc7a885..53fd9aa218d 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java @@ -272,7 +272,6 @@ public abstract class EntityRepository { @Getter protected final Fields putFields; protected boolean supportsSearch = false; - @Getter protected boolean parent = false; protected final Map, Fields>> fieldFetchers = new HashMap<>(); protected EntityRepository( @@ -1049,8 +1048,12 @@ public abstract class EntityRepository { // Update the attributes and relationships of an entity EntityUpdater entityUpdater = getUpdater(original, updated, Operation.PUT); entityUpdater.update(); - EventType change = entityUpdater.fieldsChanged() ? EventType.ENTITY_UPDATED : ENTITY_NO_CHANGE; + EventType change = + entityUpdater.incrementalFieldsChanged() ? EventType.ENTITY_UPDATED : ENTITY_NO_CHANGE; setInheritedFields(updated, new Fields(allowedFields)); + if (change == ENTITY_UPDATED) { + updated.setChangeDescription(entityUpdater.getIncrementalChangeDescription()); + } return new PutResponse<>(Status.OK, withHref(uriInfo, updated), change); } @@ -1061,29 +1064,7 @@ public abstract class EntityRepository { setInheritedFields(original, patchFields); // Apply JSON patch to the original entity to get the updated entity - T updated = JsonUtils.applyPatch(original, patch, entityClass); - updated.setUpdatedBy(user); - updated.setUpdatedAt(System.currentTimeMillis()); - - prepareInternal(updated, true); - // Validate and populate owners - List validatedOwners = getValidatedOwners(updated.getOwners()); - updated.setOwners(validatedOwners); - - restorePatchAttributes(original, updated); - - // Update the attributes and relationships of an entity - EntityUpdater entityUpdater = getUpdater(original, updated, Operation.PATCH); - entityUpdater.update(); - - entityRelationshipReindex(original, updated); - - EventType change = ENTITY_NO_CHANGE; - if (entityUpdater.fieldsChanged()) { - change = EventType.ENTITY_UPDATED; - setInheritedFields(updated, patchFields); // Restore inherited fields after a change - } - return new PatchResponse<>(Status.OK, withHref(uriInfo, updated), change); + return patchCommon(original, patch, user, uriInfo); } /** @@ -1096,6 +1077,10 @@ public abstract class EntityRepository { setInheritedFields(original, patchFields); // Apply JSON patch to the original entity to get the updated entity + return patchCommon(original, patch, user, uriInfo); + } + + private PatchResponse patchCommon(T original, JsonPatch patch, String user, UriInfo uriInfo) { T updated = JsonUtils.applyPatch(original, patch, entityClass); updated.setUpdatedBy(user); updated.setUpdatedAt(System.currentTimeMillis()); @@ -1109,12 +1094,14 @@ public abstract class EntityRepository { // Update the attributes and relationships of an entity EntityUpdater entityUpdater = getUpdater(original, updated, Operation.PATCH); entityUpdater.update(); - EventType change = ENTITY_NO_CHANGE; if (entityUpdater.fieldsChanged()) { - change = EventType.ENTITY_UPDATED; setInheritedFields(updated, patchFields); // Restore inherited fields after a change } - return new PatchResponse<>(Status.OK, withHref(uriInfo, updated), change); + updated.setChangeDescription(entityUpdater.getIncrementalChangeDescription()); + if (entityUpdater.incrementalFieldsChanged()) { + return new PatchResponse<>(Status.OK, withHref(uriInfo, updated), ENTITY_UPDATED); + } + return new PatchResponse<>(Status.OK, withHref(uriInfo, updated), ENTITY_NO_CHANGE); } @Transaction @@ -1138,6 +1125,7 @@ public abstract class EntityRepository { .withId(UUID.randomUUID()) .withEntity(entity) .withChangeDescription(change) + .withIncrementalChangeDescription(change) .withEventType(EventType.ENTITY_UPDATED) .withEntityType(entityType) .withEntityId(entityId) @@ -1146,6 +1134,8 @@ public abstract class EntityRepository { .withTimestamp(System.currentTimeMillis()) .withCurrentVersion(entity.getVersion()) .withPreviousVersion(change.getPreviousVersion()); + + entity.setIncrementalChangeDescription(change); entity.setChangeDescription(change); postUpdate(entity, entity); return new PutResponse<>(Status.OK, changeEvent, ENTITY_FIELDS_CHANGED); @@ -1186,6 +1176,7 @@ public abstract class EntityRepository { .withId(UUID.randomUUID()) .withEntity(originalEntity) .withChangeDescription(change) + .withIncrementalChangeDescription(change) .withEventType(EventType.ENTITY_UPDATED) .withEntityType(entityType) .withEntityId(entityId) @@ -1439,6 +1430,7 @@ public abstract class EntityRepository { .withId(UUID.randomUUID()) .withEntity(entity) .withChangeDescription(change) + .withIncrementalChangeDescription(change) .withEventType(EventType.ENTITY_UPDATED) .withEntityFullyQualifiedName(entity.getFullyQualifiedName()) .withEntityType(entityType) @@ -1448,6 +1440,9 @@ public abstract class EntityRepository { .withCurrentVersion(entity.getVersion()) .withPreviousVersion(change.getPreviousVersion()); + entity.setChangeDescription(change); + entity.setIncrementalChangeDescription(change); + postUpdate(entity, entity); return new PutResponse<>(Status.OK, changeEvent, ENTITY_FIELDS_CHANGED); } @@ -2507,6 +2502,35 @@ public abstract class EntityRepository { .withPreviousVersion(prevVersion); } + protected void createAndInsertChangeEvent( + T original, T updated, ChangeDescription changeDescription, EventType eventType) { + if (changeDescription == null) { + return; + } + + if (changeDescription.getPreviousVersion() == null) { + changeDescription.withPreviousVersion(original.getVersion()); + } + + ChangeEvent changeEvent = + new ChangeEvent() + .withId(UUID.randomUUID()) + .withEventType(eventType) + .withEntityType(entityType) + .withEntityId(updated.getId()) + .withEntityFullyQualifiedName(updated.getFullyQualifiedName()) + .withUserName(updated.getUpdatedBy()) + .withTimestamp(System.currentTimeMillis()) + .withCurrentVersion(updated.getVersion()) + .withPreviousVersion(changeDescription.getPreviousVersion()) + .withChangeDescription(changeDescription) + .withEntity(updated); + + daoCollection.changeEventDAO().insert(JsonUtils.pojoToJson(changeEvent)); + LOG.debug( + "Inserted incremental ChangeEvent for {} version {}", entityType, updated.getVersion()); + } + /** Remove owner relationship for a given entity */ @Transaction private void removeOwners(T entity, List owners) { @@ -2807,6 +2831,7 @@ public abstract class EntityRepository { protected boolean majorVersionChange = false; protected final User updatingUser; private boolean entityChanged = false; + @Getter protected ChangeDescription incrementalChangeDescription = null; public EntityUpdater(T original, T updated, Operation operation) { this.original = original; @@ -2822,20 +2847,25 @@ public abstract class EntityRepository { @Transaction public final void update() { boolean consolidateChanges = consolidateChanges(original, updated, operation); - // Revert the changes previously made by the user with in a session and consolidate all the - // changes + incrementalChange(); if (consolidateChanges) { revert(); } // Now updated from previous/original to updated one changeDescription = new ChangeDescription(); updateInternal(); - - // Store the updated entity storeUpdate(); postUpdate(original, updated); } + private void incrementalChange() { + changeDescription = new ChangeDescription(); + updateInternal(false); + incrementalChangeDescription = changeDescription; + incrementalChangeDescription.setPreviousVersion(original.getVersion()); + updated.setIncrementalChangeDescription(incrementalChangeDescription); + } + @Transaction private void revert() { // Revert from current version to previous version to go back to the previous version @@ -2846,6 +2876,7 @@ public abstract class EntityRepository { LOG.debug( "In session change consolidation. Reverting to previous version {}", previous.getVersion()); + changeDescription = new ChangeDescription(); updated = previous; updateInternal(true); LOG.info( @@ -3283,6 +3314,15 @@ public abstract class EntityRepository { || !changeDescription.getFieldsDeleted().isEmpty(); } + public final boolean incrementalFieldsChanged() { + if (incrementalChangeDescription == null) { + return false; + } + return !incrementalChangeDescription.getFieldsAdded().isEmpty() + || !incrementalChangeDescription.getFieldsUpdated().isEmpty() + || !incrementalChangeDescription.getFieldsDeleted().isEmpty(); + } + public final boolean recordChange(String field, K orig, K updated) { return recordChange(field, orig, updated, false, objectMatch, true); } @@ -3540,9 +3580,7 @@ public abstract class EntityRepository { private boolean consolidateChanges(T original, T updated, Operation operation) { // If user is the same and the new update is with in the user session timeout - return !parent // Parent entity shouldn't consolidate changes, as we need ChangeDescription to - // propagate to children - && original.getVersion() > 0.1 // First update on an entity that + return original.getVersion() > 0.1 // First update on an entity that && operation == Operation.PATCH && !Boolean.TRUE.equals(original.getDeleted()) // Entity is not soft deleted && !operation.isDelete() // Operation must be an update diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryRepository.java index d6519748d33..21c414b31fa 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryRepository.java @@ -89,7 +89,6 @@ public class GlossaryRepository extends EntityRepository { quoteFqn = true; supportsSearch = true; renameAllowed = true; - parent = true; } @Override diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MessagingServiceRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MessagingServiceRepository.java index 2d757f9ac87..9f3554b92c1 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MessagingServiceRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MessagingServiceRepository.java @@ -34,6 +34,5 @@ public class MessagingServiceRepository UPDATE_FIELDS, ServiceType.MESSAGING); supportsSearch = true; - parent = true; } } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MetadataServiceRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MetadataServiceRepository.java index d0cc53ba923..5f9094143e5 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MetadataServiceRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MetadataServiceRepository.java @@ -19,6 +19,5 @@ public class MetadataServiceRepository UPDATE_FIELDS, ServiceType.METADATA); supportsSearch = true; - parent = true; } } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MlModelServiceRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MlModelServiceRepository.java index 0d15888b0a5..ecd8d17d09f 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MlModelServiceRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/MlModelServiceRepository.java @@ -34,6 +34,5 @@ public class MlModelServiceRepository UPDATE_FIELDS, ServiceType.ML_MODEL); supportsSearch = true; - parent = true; } } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/PipelineServiceRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/PipelineServiceRepository.java index bcadae3b80e..e1281c96835 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/PipelineServiceRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/PipelineServiceRepository.java @@ -33,6 +33,5 @@ public class PipelineServiceRepository "", ServiceType.PIPELINE); supportsSearch = true; - parent = true; } } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/SearchServiceRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/SearchServiceRepository.java index 4cd0f5bb09b..b3acc9d2a95 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/SearchServiceRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/SearchServiceRepository.java @@ -17,6 +17,5 @@ public class SearchServiceRepository "", ServiceType.SEARCH); supportsSearch = true; - parent = true; } } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/StorageServiceRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/StorageServiceRepository.java index b101cbc193c..887d5e6e595 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/StorageServiceRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/StorageServiceRepository.java @@ -17,6 +17,5 @@ public class StorageServiceRepository "", ServiceType.STORAGE); supportsSearch = true; - parent = true; } } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TeamRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TeamRepository.java index 5c4d2e09834..e135095a485 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TeamRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TeamRepository.java @@ -113,7 +113,6 @@ public class TeamRepository extends EntityRepository { TEAM_UPDATE_FIELDS); this.quoteFqn = true; supportsSearch = true; - parent = true; } @Override diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestCaseRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestCaseRepository.java index a262e689b27..32c907f0880 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestCaseRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestCaseRepository.java @@ -514,6 +514,7 @@ public class TestCaseRepository extends EntityRepository { .withName("testSuites") .withNewValue(updatedTestCase.getTestSuites()))); updatedTestCase.setChangeDescription(change); + postUpdate(testCase, updatedTestCase); updateLogicalTestSuite(testSuiteId); testCase.setTestSuite(updatedTestCase.getTestSuite()); diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestSuiteRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestSuiteRepository.java index 859a7c848fc..49a5fae0471 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestSuiteRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestSuiteRepository.java @@ -107,7 +107,6 @@ public class TestSuiteRepository extends EntityRepository { UPDATE_FIELDS); quoteFqn = false; supportsSearch = true; - parent = true; } @Override diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/search/SearchClient.java b/openmetadata-service/src/main/java/org/openmetadata/service/search/SearchClient.java index d42fab34926..8ed856d9067 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/search/SearchClient.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/search/SearchClient.java @@ -59,6 +59,8 @@ public interface SearchClient { String PROPAGATE_FIELD_SCRIPT = "ctx._source.put('%s', '%s')"; + String PROPAGATE_NESTED_FIELD_SCRIPT = "ctx._source.%s = params.%s"; + String REMOVE_PROPAGATED_ENTITY_REFERENCE_FIELD_SCRIPT = "if ((ctx._source.%s != null) && (ctx._source.%s.inherited == true)){ ctx._source.remove('%s');}"; String REMOVE_PROPAGATED_FIELD_SCRIPT = "ctx._source.remove('%s')"; @@ -110,6 +112,19 @@ public interface SearchClient { + "params.deletedOwners.stream().anyMatch(deletedOwner -> deletedOwner.id == owner.id) && owner.inherited == true); " + "}"; + String UPDATE_TAGS_FIELD_SCRIPT = + "if (ctx._source.tags != null) { " + + "for (int i = 0; i < ctx._source.tags.size(); i++) { " + + "if (ctx._source.tags[i].tagFQN == params.tagFQN) { " + + "for (String field : params.updates.keySet()) { " + + "if (field != null && params.updates[field] != null) { " + + "ctx._source.tags[i][field] = params.updates[field]; " + + "} " + + "} " + + "} " + + "} " + + "}"; + String NOT_IMPLEMENTED_ERROR_TYPE = "NOT_IMPLEMENTED"; String ENTITY_RELATIONSHIP_DIRECTION_ENTITY = "entityRelationship.entity.fqnHash.keyword"; @@ -283,7 +298,8 @@ public interface SearchClient { Pair fieldAndValue, Pair> updates); - void updateByFqnPrefix(String indexName, String oldParentFQN, String newParentFQN); + void updateByFqnPrefix( + String indexName, String oldParentFQN, String newParentFQN, String prefixFieldCondition); void updateChildren( List indexName, diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/search/SearchRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/search/SearchRepository.java index 943a23e593f..7c4a5119599 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/search/SearchRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/search/SearchRepository.java @@ -3,7 +3,11 @@ package org.openmetadata.service.search; import static org.openmetadata.common.utils.CommonUtil.nullOrEmpty; import static org.openmetadata.service.Entity.AGGREGATED_COST_ANALYSIS_REPORT_DATA; import static org.openmetadata.service.Entity.ENTITY_REPORT_DATA; +import static org.openmetadata.service.Entity.FIELD_DISPLAY_NAME; +import static org.openmetadata.service.Entity.FIELD_DOMAIN; import static org.openmetadata.service.Entity.FIELD_FOLLOWERS; +import static org.openmetadata.service.Entity.FIELD_FULLY_QUALIFIED_NAME; +import static org.openmetadata.service.Entity.FIELD_NAME; import static org.openmetadata.service.Entity.FIELD_OWNERS; import static org.openmetadata.service.Entity.FIELD_USAGE_SUMMARY; import static org.openmetadata.service.Entity.QUERY; @@ -15,6 +19,7 @@ import static org.openmetadata.service.search.SearchClient.DEFAULT_UPDATE_SCRIPT import static org.openmetadata.service.search.SearchClient.GLOBAL_SEARCH_ALIAS; import static org.openmetadata.service.search.SearchClient.PROPAGATE_ENTITY_REFERENCE_FIELD_SCRIPT; import static org.openmetadata.service.search.SearchClient.PROPAGATE_FIELD_SCRIPT; +import static org.openmetadata.service.search.SearchClient.PROPAGATE_NESTED_FIELD_SCRIPT; import static org.openmetadata.service.search.SearchClient.PROPAGATE_TEST_SUITES_SCRIPT; import static org.openmetadata.service.search.SearchClient.REMOVE_DATA_PRODUCTS_CHILDREN_SCRIPT; import static org.openmetadata.service.search.SearchClient.REMOVE_DOMAINS_CHILDREN_SCRIPT; @@ -27,6 +32,7 @@ import static org.openmetadata.service.search.SearchClient.SOFT_DELETE_RESTORE_S import static org.openmetadata.service.search.SearchClient.UPDATE_ADDED_DELETE_GLOSSARY_TAGS; import static org.openmetadata.service.search.SearchClient.UPDATE_CERTIFICATION_SCRIPT; import static org.openmetadata.service.search.SearchClient.UPDATE_PROPAGATED_ENTITY_REFERENCE_FIELD_SCRIPT; +import static org.openmetadata.service.search.SearchClient.UPDATE_TAGS_FIELD_SCRIPT; import static org.openmetadata.service.search.models.IndexMapping.indexNameSeparator; import static org.openmetadata.service.util.EntityUtil.compareEntityReferenceById; @@ -78,6 +84,7 @@ import org.openmetadata.service.search.indexes.SearchIndex; import org.openmetadata.service.search.models.IndexMapping; import org.openmetadata.service.search.opensearch.OpenSearchClient; import org.openmetadata.service.security.policyevaluator.SubjectContext; +import org.openmetadata.service.util.FullyQualifiedName; import org.openmetadata.service.util.JsonUtils; import org.openmetadata.service.workflows.searchIndex.ReindexingUtil; @@ -93,7 +100,12 @@ public class SearchRepository { @Getter @Setter public SearchIndexFactory searchIndexFactory = new SearchIndexFactory(); private final List inheritableFields = - List.of(FIELD_OWNERS, Entity.FIELD_DOMAIN, Entity.FIELD_DISABLED, Entity.FIELD_TEST_SUITES); + List.of( + FIELD_OWNERS, + Entity.FIELD_DOMAIN, + Entity.FIELD_DISABLED, + Entity.FIELD_TEST_SUITES, + FIELD_DISPLAY_NAME); private final List propagateFields = List.of(Entity.FIELD_TAGS); @Getter private final ElasticSearchConfiguration elasticSearchConfiguration; @@ -381,10 +393,24 @@ public class SearchRepository { IndexMapping indexMapping = entityIndexMap.get(entityType); String scriptTxt = DEFAULT_UPDATE_SCRIPT; Map doc = new HashMap<>(); - if (entity.getChangeDescription() != null + + ChangeDescription incrementalChangeDescription = entity.getIncrementalChangeDescription(); + ChangeDescription changeDescription; + + if (incrementalChangeDescription != null + && (!incrementalChangeDescription.getFieldsAdded().isEmpty() + || !incrementalChangeDescription.getFieldsUpdated().isEmpty() + || !incrementalChangeDescription.getFieldsDeleted().isEmpty())) { + changeDescription = incrementalChangeDescription; + } else { + changeDescription = entity.getChangeDescription(); + } + + if (changeDescription != null + && entity.getChangeDescription() != null && Objects.equals( entity.getVersion(), entity.getChangeDescription().getPreviousVersion())) { - scriptTxt = getScriptWithParams(entity, doc); + scriptTxt = getScriptWithParams(entity, doc, changeDescription); } else { SearchIndex elasticSearchIndex = searchIndexFactory.buildIndex(entityType, entity); doc = elasticSearchIndex.buildSearchIndexDoc(); @@ -392,12 +418,10 @@ public class SearchRepository { searchClient.updateEntity( indexMapping.getIndexName(clusterAlias), entityId, doc, scriptTxt); propagateInheritedFieldsToChildren( - entityType, entityId, entity.getChangeDescription(), indexMapping, entity); - propagateGlossaryTags( - entityType, entity.getFullyQualifiedName(), entity.getChangeDescription()); - propagateCertificationTags(entityType, entity); - propagatetoRelatedEntities( - entityType, entityId, entity.getChangeDescription(), indexMapping, entity); + entityType, entityId, changeDescription, indexMapping, entity); + propagateGlossaryTags(entityType, entity.getFullyQualifiedName(), changeDescription); + propagateCertificationTags(entityType, entity, changeDescription); + propagatetoRelatedEntities(entityType, entityId, changeDescription, indexMapping, entity); } catch (Exception ie) { LOG.error( "Issue in Updating the search document for entity [{}] and entityType [{}]. Reason[{}], Cause[{}], Stack [{}]", @@ -428,7 +452,9 @@ public class SearchRepository { Pair> updates = getInheritedFieldChanges(changeDescription, entity); Pair parentMatch; - if (!updates.getValue().isEmpty() && updates.getValue().containsKey("domain")) { + if (!updates.getValue().isEmpty() + && (updates.getValue().containsKey(FIELD_DOMAIN) + || updates.getValue().containsKey(FIELD_DISPLAY_NAME))) { if (entityType.equalsIgnoreCase(Entity.DATABASE_SERVICE) || entityType.equalsIgnoreCase(Entity.DASHBOARD_SERVICE) || entityType.equalsIgnoreCase(Entity.MESSAGING_SERVICE) @@ -481,8 +507,8 @@ public class SearchRepository { } } - public void propagateCertificationTags(String entityType, EntityInterface entity) { - ChangeDescription changeDescription = entity.getChangeDescription(); + public void propagateCertificationTags( + String entityType, EntityInterface entity, ChangeDescription changeDescription) { if (changeDescription != null && entityType.equalsIgnoreCase(Entity.TAG)) { Tag tagEntity = (Tag) entity; if (tagEntity.getClassification().getFullyQualifiedName().equals("Certification")) { @@ -507,13 +533,14 @@ public class SearchRepository { EntityInterface entity) { if (changeDescription != null && entityType.equalsIgnoreCase(Entity.PAGE)) { - String indexName = indexMapping.getIndexName(clusterAlias); + String indexName = indexMapping.getIndexName(); for (FieldChange field : changeDescription.getFieldsAdded()) { if (field.getName().contains("parent")) { String oldParentFQN = entity.getName(); String newParentFQN = entity.getFullyQualifiedName(); // Propagate FQN updates to all subchildren - searchClient.updateByFqnPrefix(indexName, oldParentFQN, newParentFQN); + searchClient.updateByFqnPrefix( + indexName, oldParentFQN, newParentFQN, FIELD_FULLY_QUALIFIED_NAME); } } @@ -523,10 +550,11 @@ public class SearchRepository { JsonUtils.readValue(field.getOldValue().toString(), EntityReference.class); // Propagate FQN updates to all subchildren String originalFqn = - String.join( - ".", entityReferenceBeforeUpdate.getFullyQualifiedName(), entity.getName()); + FullyQualifiedName.add( + entityReferenceBeforeUpdate.getFullyQualifiedName(), entity.getName()); String updatedFqn = entity.getFullyQualifiedName(); - searchClient.updateByFqnPrefix(indexName, originalFqn, updatedFqn); + searchClient.updateByFqnPrefix( + indexName, originalFqn, updatedFqn, FIELD_FULLY_QUALIFIED_NAME); } } @@ -536,9 +564,45 @@ public class SearchRepository { JsonUtils.readValue(field.getOldValue().toString(), EntityReference.class); // Propagate FQN updates to all subchildren String originalFqn = - String.join( - ".", entityReferenceBeforeUpdate.getFullyQualifiedName(), entity.getName()); - searchClient.updateByFqnPrefix(indexName, originalFqn, ""); + FullyQualifiedName.add( + entityReferenceBeforeUpdate.getFullyQualifiedName(), entity.getName()); + searchClient.updateByFqnPrefix(indexName, originalFqn, "", FIELD_FULLY_QUALIFIED_NAME); + } + } + } else if (changeDescription != null + && (entityType.equalsIgnoreCase(Entity.CLASSIFICATION) + || entityType.equalsIgnoreCase(Entity.GLOSSARY) + || entityType.equalsIgnoreCase(Entity.GLOSSARY_TERM) + || entityType.equalsIgnoreCase(Entity.TAG))) { + + // Update the assets associated with the tags/terms in classification/glossary + Map paramMap = new HashMap<>(); + for (FieldChange field : changeDescription.getFieldsUpdated()) { + String parentFQN = FullyQualifiedName.getParentFQN(entity.getFullyQualifiedName()); + String oldFQN; + String newFQN; + + if (!nullOrEmpty(parentFQN)) { + oldFQN = FullyQualifiedName.add(parentFQN, field.getOldValue().toString()); + newFQN = FullyQualifiedName.add(parentFQN, field.getNewValue().toString()); + } else { + oldFQN = FullyQualifiedName.quoteName(field.getOldValue().toString()); + newFQN = FullyQualifiedName.quoteName(field.getNewValue().toString()); + } + + if (field.getName().contains(FIELD_NAME)) { + searchClient.updateByFqnPrefix(GLOBAL_SEARCH_ALIAS, oldFQN, newFQN, "tags.tagFQN"); + } + + if (field.getName().equalsIgnoreCase(Entity.FIELD_DISPLAY_NAME)) { + Map updates = new HashMap<>(); + updates.put("displayName", field.getNewValue().toString()); + paramMap.put("tagFQN", oldFQN); + paramMap.put("updates", updates); + searchClient.updateChildren( + GLOBAL_SEARCH_ALIAS, + new ImmutablePair<>("tags.tagFQN", oldFQN), + new ImmutablePair<>(UPDATE_TAGS_FIELD_SCRIPT, paramMap)); } } } @@ -600,6 +664,12 @@ public class SearchRepository { if (field.getName().equals(Entity.FIELD_TEST_SUITES)) { scriptTxt.append(PROPAGATE_TEST_SUITES_SCRIPT); fieldData.put(Entity.FIELD_TEST_SUITES, field.getNewValue()); + } else if (field.getName().equals(Entity.FIELD_DISPLAY_NAME)) { + String fieldPath = + getFieldPath(entity.getEntityReference().getType(), field.getName()); + fieldData.put(field.getName(), field.getNewValue().toString()); + scriptTxt.append( + String.format(PROPAGATE_NESTED_FIELD_SCRIPT, fieldPath, field.getName())); } else { scriptTxt.append( String.format(PROPAGATE_FIELD_SCRIPT, field.getName(), field.getNewValue())); @@ -634,9 +704,17 @@ public class SearchRepository { } scriptTxt.append(" "); } catch (UnhandledServerException e) { - scriptTxt.append( - String.format(PROPAGATE_FIELD_SCRIPT, field.getName(), field.getNewValue())); - scriptTxt.append(" "); + if (field.getName().equals(Entity.FIELD_DISPLAY_NAME)) { + String fieldPath = + getFieldPath(entity.getEntityReference().getType(), field.getName()); + fieldData.put(field.getName(), field.getNewValue().toString()); + scriptTxt.append( + String.format(PROPAGATE_NESTED_FIELD_SCRIPT, fieldPath, field.getName())); + } else { + scriptTxt.append( + String.format(PROPAGATE_FIELD_SCRIPT, field.getName(), field.getNewValue())); + scriptTxt.append(" "); + } } } } @@ -644,6 +722,21 @@ public class SearchRepository { return new ImmutablePair<>(scriptTxt.toString(), fieldData); } + private String getFieldPath(String entityType, String fieldName) { + if (entityType.equalsIgnoreCase(Entity.DATABASE_SERVICE) + || entityType.equalsIgnoreCase(Entity.DASHBOARD_SERVICE) + || entityType.equalsIgnoreCase(Entity.MESSAGING_SERVICE) + || entityType.equalsIgnoreCase(Entity.PIPELINE_SERVICE) + || entityType.equalsIgnoreCase(Entity.MLMODEL_SERVICE) + || entityType.equalsIgnoreCase(Entity.STORAGE_SERVICE) + || entityType.equalsIgnoreCase(Entity.SEARCH_SERVICE) + || entityType.equalsIgnoreCase(Entity.API_SERVICE)) { + return "service." + fieldName; + } else { + return entityType + "." + fieldName; + } + } + public void deleteByScript(String entityType, String scriptTxt, Map params) { try { IndexMapping indexMapping = getIndexMapping(entityType); @@ -841,9 +934,10 @@ public class SearchRepository { } } - public String getScriptWithParams(EntityInterface entity, Map fieldAddParams) { - ChangeDescription changeDescription = entity.getChangeDescription(); - + public String getScriptWithParams( + EntityInterface entity, + Map fieldAddParams, + ChangeDescription changeDescription) { List fieldsAdded = changeDescription.getFieldsAdded(); StringBuilder scriptTxt = new StringBuilder(); fieldAddParams.put("updatedAt", entity.getUpdatedAt()); diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/search/elasticsearch/ElasticSearchClient.java b/openmetadata-service/src/main/java/org/openmetadata/service/search/elasticsearch/ElasticSearchClient.java index 1cfe293ec49..43b52306044 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/search/elasticsearch/ElasticSearchClient.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/search/elasticsearch/ElasticSearchClient.java @@ -2240,12 +2240,13 @@ public class ElasticSearchClient implements SearchClient { } @Override - public void updateByFqnPrefix(String indexName, String oldParentFQN, String newParentFQN) { + public void updateByFqnPrefix( + String indexName, String oldParentFQN, String newParentFQN, String prefixFieldCondition) { // Match all children documents whose fullyQualifiedName starts with the old parent's FQN - PrefixQueryBuilder prefixQuery = - new PrefixQueryBuilder("fullyQualifiedName", oldParentFQN + "."); + PrefixQueryBuilder prefixQuery = new PrefixQueryBuilder(prefixFieldCondition, oldParentFQN); - UpdateByQueryRequest updateByQueryRequest = new UpdateByQueryRequest(indexName); + UpdateByQueryRequest updateByQueryRequest = + new UpdateByQueryRequest(Entity.getSearchRepository().getIndexOrAliasName(indexName)); updateByQueryRequest.setQuery(prefixQuery); Map params = new HashMap<>(); @@ -2261,6 +2262,14 @@ public class ElasticSearchClient implements SearchClient { + " String parentFQN = ctx._source.parent.fullyQualifiedName; " + " ctx._source.parent.fullyQualifiedName = parentFQN.replace(params.oldParentFQN, params.newParentFQN); " + " } " + + "} " + + "if (ctx._source.containsKey('tags')) { " + + " for (int i = 0; i < ctx._source.tags.size(); i++) { " + + " if (ctx._source.tags[i].containsKey('tagFQN')) { " + + " String tagFQN = ctx._source.tags[i].tagFQN; " + + " ctx._source.tags[i].tagFQN = tagFQN.replace(params.oldParentFQN, params.newParentFQN); " + + " } " + + " } " + "}"; Script inlineScript = diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/search/indexes/SearchIndex.java b/openmetadata-service/src/main/java/org/openmetadata/service/search/indexes/SearchIndex.java index 902366cea84..67df7b139f6 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/search/indexes/SearchIndex.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/search/indexes/SearchIndex.java @@ -42,7 +42,11 @@ import org.openmetadata.service.util.JsonUtils; public interface SearchIndex { Set DEFAULT_EXCLUDED_FIELDS = - Set.of("changeDescription", "lineage.pipeline.changeDescription", "connection"); + Set.of( + "changeDescription", + "incrementalChangeDescription", + "lineage.pipeline.changeDescription", + "connection"); public static final SearchClient searchClient = Entity.getSearchRepository().getSearchClient(); default Map buildSearchIndexDoc() { diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/search/models/IndexMapping.java b/openmetadata-service/src/main/java/org/openmetadata/service/search/models/IndexMapping.java index 52b9e18bc51..f804adf15e0 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/search/models/IndexMapping.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/search/models/IndexMapping.java @@ -11,7 +11,7 @@ import lombok.extern.jackson.Jacksonized; @Getter @Builder public class IndexMapping { - String indexName; + @Getter String indexName; String indexMappingFile; String alias; List parentAliases; @@ -42,10 +42,6 @@ public class IndexMapping { : childAliases; } - private String getIndexName() { - return indexName; - } - private String getAlias() { return alias; } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/search/opensearch/OpenSearchClient.java b/openmetadata-service/src/main/java/org/openmetadata/service/search/opensearch/OpenSearchClient.java index 787bee18958..92aab0d3d7f 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/search/opensearch/OpenSearchClient.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/search/opensearch/OpenSearchClient.java @@ -2227,12 +2227,12 @@ public class OpenSearchClient implements SearchClient { } @Override - public void updateByFqnPrefix(String indexName, String oldParentFQN, String newParentFQN) { + public void updateByFqnPrefix( + String indexName, String oldParentFQN, String newParentFQN, String prefixFieldCondition) { // Match all children documents whose fullyQualifiedName starts with the old parent's FQN - PrefixQueryBuilder prefixQuery = - new PrefixQueryBuilder("fullyQualifiedName", oldParentFQN + "."); - - UpdateByQueryRequest updateByQueryRequest = new UpdateByQueryRequest(indexName); + PrefixQueryBuilder prefixQuery = new PrefixQueryBuilder(prefixFieldCondition, oldParentFQN); + UpdateByQueryRequest updateByQueryRequest = + new UpdateByQueryRequest(Entity.getSearchRepository().getIndexOrAliasName(indexName)); updateByQueryRequest.setQuery(prefixQuery); Map params = new HashMap<>(); @@ -2248,6 +2248,14 @@ public class OpenSearchClient implements SearchClient { + " String parentFQN = ctx._source.parent.fullyQualifiedName; " + " ctx._source.parent.fullyQualifiedName = parentFQN.replace(params.oldParentFQN, params.newParentFQN); " + " } " + + "} " + + "if (ctx._source.containsKey('tags')) { " + + " for (int i = 0; i < ctx._source.tags.size(); i++) { " + + " if (ctx._source.tags[i].containsKey('tagFQN')) { " + + " String tagFQN = ctx._source.tags[i].tagFQN; " + + " ctx._source.tags[i].tagFQN = tagFQN.replace(params.oldParentFQN, params.newParentFQN); " + + " } " + + " } " + "}"; Script inlineScript = new Script(ScriptType.INLINE, Script.DEFAULT_SCRIPT_LANG, painlessScript, params); diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/EntityResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/EntityResourceTest.java index de2e355ba00..1e277b57835 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/EntityResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/EntityResourceTest.java @@ -1575,26 +1575,16 @@ public abstract class EntityResourceTest requestFields = endpoint.getRequestSchema().getSchemaFields(); assertFields(api_response_fields, requestFields); + endpointJson = JsonUtils.pojoToJson(endpoint); requestFields.get(0).getTags().add(PII_SENSITIVE_TAG_LABEL); requestFields.get(0).getTags().add(USER_ADDRESS_TAG_LABEL); patchEntity(endpoint.getId(), endpointJson, endpoint, ADMIN_AUTH_HEADERS); diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/charts/ChartResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/charts/ChartResourceTest.java index fd666431d15..26bbe5a6724 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/charts/ChartResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/charts/ChartResourceTest.java @@ -23,7 +23,6 @@ import static org.openmetadata.service.util.EntityUtil.fieldAdded; import static org.openmetadata.service.util.EntityUtil.fieldDeleted; import static org.openmetadata.service.util.EntityUtil.fieldUpdated; import static org.openmetadata.service.util.TestUtils.ADMIN_AUTH_HEADERS; -import static org.openmetadata.service.util.TestUtils.UpdateType.CHANGE_CONSOLIDATED; import static org.openmetadata.service.util.TestUtils.UpdateType.MINOR_UPDATE; import static org.openmetadata.service.util.TestUtils.assertListNotNull; import static org.openmetadata.service.util.TestUtils.assertListNull; @@ -164,12 +163,12 @@ public class ChartResourceTest extends EntityResourceTest { // Update description, chartType and chart url and verify patch // Changes from this PATCH is consolidated with the previous changes originalJson = JsonUtils.pojoToJson(chart); - change = getChangeDescription(chart, CHANGE_CONSOLIDATED); - fieldAdded(change, "description", "desc2"); - fieldAdded(change, "chartType", type2); - fieldAdded(change, "sourceUrl", "url2"); + change = getChangeDescription(chart, MINOR_UPDATE); + fieldUpdated(change, "description", "desc1", "desc2"); + fieldUpdated(change, "chartType", type1, type2); + fieldUpdated(change, "sourceUrl", "url1", "url2"); chart.withChartType(type2).withSourceUrl("url2").withDescription("desc2"); - patchEntityAndCheck(chart, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityAndCheck(chart, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } @Test @@ -277,13 +276,12 @@ public class ChartResourceTest extends EntityResourceTest { // Update description, chartType and chart url and verify patch // Changes from this PATCH is consolidated with the previous changes originalJson = JsonUtils.pojoToJson(chart); - change = getChangeDescription(chart, CHANGE_CONSOLIDATED); - fieldAdded(change, "description", "desc2"); - fieldAdded(change, "chartType", type2); - fieldAdded(change, "sourceUrl", "url2"); + change = getChangeDescription(chart, MINOR_UPDATE); + fieldUpdated(change, "description", "desc1", "desc2"); + fieldUpdated(change, "chartType", type1, type2); + fieldUpdated(change, "sourceUrl", "url1", "url2"); chart.withChartType(type2).withSourceUrl("url2").withDescription("desc2"); - patchEntityUsingFqnAndCheck( - chart, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(chart, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } @Test diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/databases/TableResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/databases/TableResourceTest.java index d48e8dc340f..805f563c2f4 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/databases/TableResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/databases/TableResourceTest.java @@ -59,11 +59,9 @@ import static org.openmetadata.service.util.EntityUtil.tagLabelMatch; import static org.openmetadata.service.util.FullyQualifiedName.build; import static org.openmetadata.service.util.RestUtil.DATE_FORMAT; import static org.openmetadata.service.util.TestUtils.*; -import static org.openmetadata.service.util.TestUtils.UpdateType.CHANGE_CONSOLIDATED; import static org.openmetadata.service.util.TestUtils.UpdateType.MAJOR_UPDATE; import static org.openmetadata.service.util.TestUtils.UpdateType.MINOR_UPDATE; import static org.openmetadata.service.util.TestUtils.UpdateType.NO_CHANGE; -import static org.openmetadata.service.util.TestUtils.UpdateType.REVERT; import com.google.common.collect.Lists; import es.org.elasticsearch.client.Request; @@ -430,7 +428,7 @@ public class TableResourceTest extends EntityResourceTest { // Change the case of the column name for column2, and it shouldn't update column2.setName("COLUMN2"); change = getChangeDescription(table, NO_CHANGE); - updateAndCheckEntity(create, OK, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + updateAndCheckEntity(create, OK, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } public static Column getColumn(String name, ColumnDataType columnDataType, TagLabel tag) { @@ -1836,25 +1834,30 @@ public class TableResourceTest extends EntityResourceTest { .withConstraintType(ConstraintType.UNIQUE) .withColumns(List.of(C2))); originalJson = JsonUtils.pojoToJson(table); - change = getChangeDescription(table, CHANGE_CONSOLIDATED); + change = getChangeDescription(table, MINOR_UPDATE); + change.setPreviousVersion(table.getVersion()); table.withTableType(TableType.External).withTableConstraints(tableConstraints1); - fieldAdded(change, "tableType", TableType.External); + fieldUpdated(change, "tableType", TableType.Regular, TableType.External); fieldAdded(change, "tableConstraints", tableConstraints1); - table = - patchEntityAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + fieldDeleted(change, "tableConstraints", tableConstraints); + table = patchEntityAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Remove tableType, tableConstraints // Changes from this PATCH is consolidated with the previous changes resulting in no change + change = getChangeDescription(table, MINOR_UPDATE); + fieldDeleted(change, "tableType", TableType.External); + fieldDeleted(change, "tableConstraints", tableConstraints1); originalJson = JsonUtils.pojoToJson(table); table.withTableType(null).withTableConstraints(null); - patchEntityAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, REVERT, null); + table = patchEntityAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // add retention period originalJson = JsonUtils.pojoToJson(table); table.withRetentionPeriod("10D"); - change = getChangeDescription(table, CHANGE_CONSOLIDATED); + change = getChangeDescription(table, MINOR_UPDATE); + change.setPreviousVersion(table.getVersion()); fieldAdded(change, "retentionPeriod", "10D"); - patchEntityAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } @Test @@ -1893,13 +1896,8 @@ public class TableResourceTest extends EntityResourceTest { // Now reduce the precision and make sure it is a backward incompatible change // Changes from this PATCH is consolidated with the previous changes - change = getChangeDescription(table, CHANGE_CONSOLIDATED); - fieldAdded(change, build("columns", C1, "description"), "new0"); - fieldAdded(change, build("columns", C1, "tags"), List.of(GLOSSARY1_TERM1_LABEL)); - fieldUpdated(change, build("columns", C2, "description"), C2, "new1"); - fieldDeleted(change, build("columns", C3, "tags"), List.of(GLOSSARY1_TERM1_LABEL)); - fieldAdded(change, build("columns", C3, "precision"), 7); // Change in this patch - fieldAdded(change, build("columns", C3, "scale"), 3); + change = getChangeDescription(table, MINOR_UPDATE); + fieldUpdated(change, build("columns", C3, "precision"), 10, 7); // Change in this patch originalJson = JsonUtils.pojoToJson(table); columns = table.getColumns(); columns @@ -1907,19 +1905,13 @@ public class TableResourceTest extends EntityResourceTest { .withPrecision(7) .withScale(3); // Precision change from 10 to 7. Scale remains the same table.setColumns(columns); - table = - patchEntityAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + table = patchEntityAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); assertColumns(columns, table.getColumns()); // Now reduce the scale and make sure it is a backward incompatible change // Changes from this PATCH is consolidated with the previous changes - change = getChangeDescription(table, CHANGE_CONSOLIDATED); - fieldAdded(change, build("columns", C1, "description"), "new0"); - fieldAdded(change, build("columns", C1, "tags"), List.of(GLOSSARY1_TERM1_LABEL)); - fieldUpdated(change, build("columns", C2, "description"), C2, "new1"); - fieldDeleted(change, build("columns", C3, "tags"), List.of(GLOSSARY1_TERM1_LABEL)); - fieldAdded(change, build("columns", C3, "precision"), 7); - fieldAdded(change, build("columns", C3, "scale"), 1); // Change in this patch + change = getChangeDescription(table, MINOR_UPDATE); + fieldUpdated(change, build("columns", C3, "scale"), 3, 1); // Change in this patch originalJson = JsonUtils.pojoToJson(table); columns = table.getColumns(); columns @@ -1927,8 +1919,7 @@ public class TableResourceTest extends EntityResourceTest { .withPrecision(7) .withScale(1); // Scale change from 10 to 7. Scale remains the same table.setColumns(columns); - table = - patchEntityAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + table = patchEntityAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); assertColumns(columns, table.getColumns()); } @@ -2017,27 +2008,32 @@ public class TableResourceTest extends EntityResourceTest { .withConstraintType(ConstraintType.UNIQUE) .withColumns(List.of(C2))); originalJson = JsonUtils.pojoToJson(table); - change = getChangeDescription(table, CHANGE_CONSOLIDATED); + change = getChangeDescription(table, MINOR_UPDATE); table.withTableType(TableType.External).withTableConstraints(tableConstraints1); - fieldAdded(change, "tableType", TableType.External); + fieldUpdated(change, "tableType", TableType.Regular, TableType.External); + fieldDeleted(change, "tableConstraints", tableConstraints); fieldAdded(change, "tableConstraints", tableConstraints1); table = - patchEntityUsingFqnAndCheck( - table, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Remove tableType, tableConstraints // Changes from this PATCH is consolidated with the previous changes resulting in no change + change = getChangeDescription(table, MINOR_UPDATE); + change.setPreviousVersion(table.getVersion()); + fieldDeleted(change, "tableType", TableType.External); + fieldDeleted(change, "tableConstraints", tableConstraints1); originalJson = JsonUtils.pojoToJson(table); table.withTableType(null).withTableConstraints(null); - patchEntityUsingFqnAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, REVERT, null); + table = + patchEntityUsingFqnAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // add retention period originalJson = JsonUtils.pojoToJson(table); table.withRetentionPeriod("10D"); - change = getChangeDescription(table, CHANGE_CONSOLIDATED); + change = getChangeDescription(table, MINOR_UPDATE); + change.setPreviousVersion(table.getVersion()); fieldAdded(change, "retentionPeriod", "10D"); - patchEntityUsingFqnAndCheck( - table, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } @Test @@ -2077,13 +2073,8 @@ public class TableResourceTest extends EntityResourceTest { // Now reduce the precision and make sure it is a backward incompatible change // Changes from this PATCH is consolidated with the previous changes - change = getChangeDescription(table, CHANGE_CONSOLIDATED); - fieldAdded(change, build("columns", C1, "description"), "new0"); - fieldAdded(change, build("columns", C1, "tags"), List.of(GLOSSARY1_TERM1_LABEL)); - fieldUpdated(change, build("columns", C2, "description"), C2, "new1"); - fieldDeleted(change, build("columns", C3, "tags"), List.of(GLOSSARY1_TERM1_LABEL)); - fieldAdded(change, build("columns", C3, "precision"), 7); // Change in this patch - fieldAdded(change, build("columns", C3, "scale"), 3); + change = getChangeDescription(table, MINOR_UPDATE); + fieldUpdated(change, build("columns", C3, "precision"), 10, 7); // Change in this patch originalJson = JsonUtils.pojoToJson(table); columns = table.getColumns(); columns @@ -2092,19 +2083,13 @@ public class TableResourceTest extends EntityResourceTest { .withScale(3); // Precision change from 10 to 7. Scale remains the same table.setColumns(columns); table = - patchEntityUsingFqnAndCheck( - table, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); assertColumns(columns, table.getColumns()); // Now reduce the scale and make sure it is a backward incompatible change // Changes from this PATCH is consolidated with the previous changes - change = getChangeDescription(table, CHANGE_CONSOLIDATED); - fieldAdded(change, build("columns", C1, "description"), "new0"); - fieldAdded(change, build("columns", C1, "tags"), List.of(GLOSSARY1_TERM1_LABEL)); - fieldUpdated(change, build("columns", C2, "description"), C2, "new1"); - fieldDeleted(change, build("columns", C3, "tags"), List.of(GLOSSARY1_TERM1_LABEL)); - fieldAdded(change, build("columns", C3, "precision"), 7); - fieldAdded(change, build("columns", C3, "scale"), 1); // Change in this patch + change = getChangeDescription(table, MINOR_UPDATE); + fieldUpdated(change, build("columns", C3, "scale"), 3, 1); originalJson = JsonUtils.pojoToJson(table); columns = table.getColumns(); columns @@ -2113,8 +2098,7 @@ public class TableResourceTest extends EntityResourceTest { .withScale(1); // Scale change from 10 to 7. Scale remains the same table.setColumns(columns); table = - patchEntityUsingFqnAndCheck( - table, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(table, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); assertColumns(columns, table.getColumns()); } @@ -3509,6 +3493,8 @@ public class TableResourceTest extends EntityResourceTest { List actualConstraints = JsonUtils.readObjects(actual.toString(), TableConstraint.class); assertEquals(expectedConstraints, actualConstraints); + } else if (fieldName.contains("columns") && fieldName.equals("precision")) { + assertEquals(expected, actual); } else if (fieldName.contains("columns") && !fieldName.endsWith(FIELD_TAGS)) { assertColumnsFieldChange(expected, actual); } else if (fieldName.endsWith("tableType")) { diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/domains/DataProductResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/domains/DataProductResourceTest.java index a83a5bf224c..8cccbebb5a6 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/domains/DataProductResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/domains/DataProductResourceTest.java @@ -10,7 +10,6 @@ import static org.openmetadata.service.util.EntityUtil.fieldAdded; import static org.openmetadata.service.util.EntityUtil.fieldDeleted; import static org.openmetadata.service.util.TestUtils.*; import static org.openmetadata.service.util.TestUtils.UpdateType.MINOR_UPDATE; -import static org.openmetadata.service.util.TestUtils.UpdateType.REVERT; import java.io.IOException; import java.util.HashMap; @@ -88,9 +87,10 @@ public class DataProductResourceTest extends EntityResourceTest { fieldA.withDescription("updated2").withDisplayName("Updated Integer A 2"); String json = JsonUtils.pojoToJson(topicEntity); topicEntity.setCustomProperties(List.of(fieldA)); - change = getChangeDescription(topicEntity, CHANGE_CONSOLIDATED); - fieldUpdated(change, EntityUtil.getCustomField(fieldA, "description"), "intA", "updated2"); + change = getChangeDescription(topicEntity, MINOR_UPDATE); + fieldUpdated(change, EntityUtil.getCustomField(fieldA, "description"), "updated", "updated2"); fieldUpdated( change, EntityUtil.getCustomField(fieldA, "displayName"), - "Integer A", + "Updated Integer A", "Updated Integer A 2"); - topicEntity = - patchEntityAndCheck(topicEntity, json, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + topicEntity = patchEntityAndCheck(topicEntity, json, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Add a second property with name intB with type integer // Note that since this is PUT operation, the previous changes are not consolidated @@ -279,21 +277,6 @@ public class TypeResourceTest extends EntityResourceTest { tableEntity.getId(), enumFieldA, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change5); assertCustomProperties(new ArrayList<>(List.of(enumFieldA)), tableEntity.getCustomProperties()); - // Changing custom property description with PATCH - // Changes from this PATCH is consolidated with the previous changes - enumFieldA.withDescription("updated2"); - String json = JsonUtils.pojoToJson(tableEntity); - tableEntity.setCustomProperties(List.of(enumFieldA)); - change = getChangeDescription(tableEntity, CHANGE_CONSOLIDATED); - fieldUpdated( - change5, - EntityUtil.getCustomField(enumFieldA, "description"), - "updatedEnumTest", - "updated2"); - - tableEntity = - patchEntityAndCheck(tableEntity, json, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change5); - /* // Add a second property with name intB with type integer // Note that since this is PUT operation, the previous changes are not consolidated EntityReference typeRef = @@ -424,16 +407,7 @@ public class TypeResourceTest extends EntityResourceTest { tableTypeFieldA.withDescription("updated tableCustomPropertyTest description 2"); String json = JsonUtils.pojoToJson(databaseEntity); databaseEntity.setCustomProperties(List.of(tableTypeFieldA)); - change = getChangeDescription(databaseEntity, CHANGE_CONSOLIDATED); - - fieldUpdated( - change6, - EntityUtil.getCustomField(tableTypeFieldA, "description"), - "updated tableCustomPropertyTest description", - "updated tableCustomPropertyTest description 2"); - - databaseEntity = - patchEntityAndCheck(databaseEntity, json, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change6); + change6 = getChangeDescription(databaseEntity, MINOR_UPDATE); } @Test diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/pipelines/PipelineResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/pipelines/PipelineResourceTest.java index 7b02964dd5e..f0e38466818 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/pipelines/PipelineResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/pipelines/PipelineResourceTest.java @@ -521,30 +521,30 @@ public class PipelineResourceTest extends EntityResourceTest newTasks = new ArrayList<>(); Task taskWithDesc = taskEmptyDesc .withDescription("taskDescription") .withTags(List.of(USER_ADDRESS_TAG_LABEL, PII_SENSITIVE_TAG_LABEL)); newTasks.add(taskWithDesc); - fieldAdded(change, "tasks", newTasks); - fieldUpdated(change, "description", "", "newDescription"); + fieldAdded(change, "tasks.taskEmpty.description", "taskDescription"); + fieldAdded( + change, "tasks.taskEmpty.tags", List.of(USER_ADDRESS_TAG_LABEL, PII_SENSITIVE_TAG_LABEL)); List updatedNewTasks = Stream.concat(TASKS.stream(), newTasks.stream()).collect(Collectors.toList()); pipeline.setTasks(updatedNewTasks); - pipeline = - patchEntityAndCheck(pipeline, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + pipeline = patchEntityAndCheck(pipeline, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Update the descriptions of pipeline and task and add tags to tasks // Changes from this PATCH is consolidated with the previous changes origJson = JsonUtils.pojoToJson(pipeline); - change = getChangeDescription(pipeline, CHANGE_CONSOLIDATED); + change = getChangeDescription(pipeline, MINOR_UPDATE); newTasks = new ArrayList<>(); taskWithDesc = taskEmptyDesc.withDescription("newTaskDescription"); newTasks.add(taskWithDesc); - fieldAdded(change, "tasks", tasks); - fieldUpdated(change, "description", "", "newDescription2"); + fieldUpdated(change, "description", "newDescription", "newDescription2"); + fieldUpdated(change, "tasks.taskEmpty.description", "taskDescription", "newTaskDescription"); updatedNewTasks = Stream.concat(TASKS.stream(), newTasks.stream()).collect(Collectors.toList()); pipeline.setTasks(updatedNewTasks); pipeline.setDescription("newDescription2"); @@ -554,16 +554,16 @@ public class PipelineResourceTest extends EntityResourceTest(); Task taskWithoutDesc = taskEmptyDesc.withDescription(null); newTasks.add(taskWithoutDesc); updatedNewTasks = Stream.concat(TASKS.stream(), newTasks.stream()).collect(Collectors.toList()); - fieldAdded(change, "tasks", newTasks); pipeline.setTasks(updatedNewTasks); - pipeline.setDescription( - ""); // Since description started out to be empty, during consolidation, no change - patchEntityAndCheck(pipeline, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + pipeline.setDescription(""); + fieldUpdated(change, "description", "newDescription2", ""); + fieldDeleted(change, "tasks.taskEmpty.description", "newTaskDescription"); + patchEntityAndCheck(pipeline, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } @Test @@ -651,52 +651,51 @@ public class PipelineResourceTest extends EntityResourceTest newTasks = new ArrayList<>(); Task taskWithDesc = taskEmptyDesc .withDescription("taskDescription") .withTags(List.of(USER_ADDRESS_TAG_LABEL, PII_SENSITIVE_TAG_LABEL)); newTasks.add(taskWithDesc); - fieldAdded(change, "tasks", newTasks); - fieldUpdated(change, "description", "", "newDescription"); + fieldAdded(change, "tasks.taskEmpty.description", "taskDescription"); + fieldAdded( + change, "tasks.taskEmpty.tags", List.of(USER_ADDRESS_TAG_LABEL, PII_SENSITIVE_TAG_LABEL)); List updatedNewTasks = Stream.concat(TASKS.stream(), newTasks.stream()).collect(Collectors.toList()); pipeline.setTasks(updatedNewTasks); pipeline = - patchEntityUsingFqnAndCheck( - pipeline, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(pipeline, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Update the descriptions of pipeline and task and add tags to tasks // Changes from this PATCH is consolidated with the previous changes origJson = JsonUtils.pojoToJson(pipeline); - change = getChangeDescription(pipeline, CHANGE_CONSOLIDATED); + change = getChangeDescription(pipeline, MINOR_UPDATE); newTasks = new ArrayList<>(); taskWithDesc = taskEmptyDesc.withDescription("newTaskDescription"); newTasks.add(taskWithDesc); - fieldAdded(change, "tasks", tasks); - fieldUpdated(change, "description", "", "newDescription2"); + fieldUpdated(change, "description", "newDescription", "newDescription2"); + fieldUpdated(change, "tasks.taskEmpty.description", "taskDescription", "newTaskDescription"); updatedNewTasks = Stream.concat(TASKS.stream(), newTasks.stream()).collect(Collectors.toList()); pipeline.setTasks(updatedNewTasks); pipeline.setDescription("newDescription2"); pipeline = - patchEntityUsingFqnAndCheck( - pipeline, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(pipeline, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Delete task and pipeline description by setting them to null // Changes from this PATCH is consolidated with the previous changes origJson = JsonUtils.pojoToJson(pipeline); - change = getChangeDescription(pipeline, CHANGE_CONSOLIDATED); + change = getChangeDescription(pipeline, MINOR_UPDATE); newTasks = new ArrayList<>(); Task taskWithoutDesc = taskEmptyDesc.withDescription(null); newTasks.add(taskWithoutDesc); updatedNewTasks = Stream.concat(TASKS.stream(), newTasks.stream()).collect(Collectors.toList()); - fieldAdded(change, "tasks", newTasks); + fieldUpdated(change, "description", "newDescription2", ""); + fieldDeleted(change, "tasks.taskEmpty.description", "newTaskDescription"); pipeline.setTasks(updatedNewTasks); pipeline.setDescription( ""); // Since description started out to be empty, during consolidation, no change - patchEntityUsingFqnAndCheck( - pipeline, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(pipeline, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } @Test diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/policies/PolicyResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/policies/PolicyResourceTest.java index 1b3b30bb6f7..aaabf4f7d89 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/policies/PolicyResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/policies/PolicyResourceTest.java @@ -34,7 +34,6 @@ import static org.openmetadata.service.util.EntityUtil.fieldDeleted; import static org.openmetadata.service.util.EntityUtil.fieldUpdated; import static org.openmetadata.service.util.EntityUtil.getRuleField; import static org.openmetadata.service.util.TestUtils.ADMIN_AUTH_HEADERS; -import static org.openmetadata.service.util.TestUtils.UpdateType.CHANGE_CONSOLIDATED; import static org.openmetadata.service.util.TestUtils.UpdateType.MINOR_UPDATE; import static org.openmetadata.service.util.TestUtils.assertListNotNull; import static org.openmetadata.service.util.TestUtils.assertListNull; @@ -356,16 +355,12 @@ public class PolicyResourceTest extends EntityResourceTest // Change existing rule1 fields. Update description and condition // Changes from this PATCH is consolidated with the previous changes origJson = JsonUtils.pojoToJson(policy); - change = getChangeDescription(policy, CHANGE_CONSOLIDATED); + change = getChangeDescription(policy, MINOR_UPDATE); rule1.withDescription("newDescription").withCondition("noOwner()"); - fieldAdded(change, getRuleField(rule1, FIELD_DESCRIPTION), "newDescription"); - fieldUpdated(change, getRuleField(rule1, "effect"), ALLOW, DENY); - fieldUpdated( - change, getRuleField(rule1, "resources"), List.of(ALL_RESOURCES), List.of("table")); - fieldUpdated(change, getRuleField(rule1, "operations"), List.of(VIEW_ALL), List.of(EDIT_ALL)); - fieldAdded(change, getRuleField(rule1, "condition"), "noOwner()"); + fieldUpdated(change, getRuleField(rule1, FIELD_DESCRIPTION), "description", "newDescription"); + fieldUpdated(change, getRuleField(rule1, "condition"), "isOwner()", "noOwner()"); policy.setRules(List.of(rule1)); - policy = patchEntityAndCheck(policy, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + policy = patchEntityAndCheck(policy, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Add a new rule - Changes from this PATCH is consolidated with the previous changes origJson = JsonUtils.pojoToJson(policy); @@ -373,26 +368,17 @@ public class PolicyResourceTest extends EntityResourceTest accessControlRule( "newRule", List.of(ALL_RESOURCES), List.of(MetadataOperation.EDIT_DESCRIPTION), ALLOW); policy.getRules().add(newRule); - change = getChangeDescription(policy, CHANGE_CONSOLIDATED); - fieldAdded(change, getRuleField(rule1, FIELD_DESCRIPTION), "newDescription"); - fieldUpdated(change, getRuleField(rule1, "effect"), ALLOW, DENY); - fieldUpdated( - change, getRuleField(rule1, "resources"), List.of(ALL_RESOURCES), List.of("table")); - fieldUpdated(change, getRuleField(rule1, "operations"), List.of(VIEW_ALL), List.of(EDIT_ALL)); - fieldAdded(change, getRuleField(rule1, "condition"), "noOwner()"); - fieldAdded(change, "rules", List.of(newRule)); - policy = patchEntityAndCheck(policy, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + change = getChangeDescription(policy, MINOR_UPDATE); + fieldAdded(change, "rules", listOf(newRule)); + policy = patchEntityAndCheck(policy, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Delete rule1 rule // Changes from this PATCH is consolidated with the previous changes origJson = JsonUtils.pojoToJson(policy); policy.setRules(List.of(newRule)); - change = getChangeDescription(policy, CHANGE_CONSOLIDATED); - // Revert all the changes made to rule1 to the state when it was added first - rule1 = accessControlRule("rule1", List.of(ALL_RESOURCES), List.of(VIEW_ALL), ALLOW); - fieldAdded(change, "rules", List.of(newRule)); + change = getChangeDescription(policy, MINOR_UPDATE); fieldDeleted(change, "rules", List.of(rule1)); - patchEntityAndCheck(policy, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityAndCheck(policy, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } @Test @@ -475,18 +461,13 @@ public class PolicyResourceTest extends EntityResourceTest // Change existing rule1 fields. Update description and condition // Changes from this PATCH is consolidated with the previous changes origJson = JsonUtils.pojoToJson(policy); - change = getChangeDescription(policy, CHANGE_CONSOLIDATED); + change = getChangeDescription(policy, MINOR_UPDATE); rule1.withDescription("newDescription").withCondition("noOwner()"); - fieldAdded(change, getRuleField(rule1, FIELD_DESCRIPTION), "newDescription"); - fieldUpdated(change, getRuleField(rule1, "effect"), ALLOW, DENY); - fieldUpdated( - change, getRuleField(rule1, "resources"), List.of(ALL_RESOURCES), List.of("table")); - fieldUpdated(change, getRuleField(rule1, "operations"), List.of(VIEW_ALL), List.of(EDIT_ALL)); - fieldAdded(change, getRuleField(rule1, "condition"), "noOwner()"); + fieldUpdated(change, getRuleField(rule1, FIELD_DESCRIPTION), "description", "newDescription"); + fieldUpdated(change, getRuleField(rule1, "condition"), "isOwner()", "noOwner()"); policy.setRules(List.of(rule1)); policy = - patchEntityUsingFqnAndCheck( - policy, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(policy, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Add a new rule - Changes from this PATCH is consolidated with the previous changes origJson = JsonUtils.pojoToJson(policy); @@ -494,28 +475,19 @@ public class PolicyResourceTest extends EntityResourceTest accessControlRule( "newRule", List.of(ALL_RESOURCES), List.of(MetadataOperation.EDIT_DESCRIPTION), ALLOW); policy.getRules().add(newRule); - change = getChangeDescription(policy, CHANGE_CONSOLIDATED); - fieldAdded(change, getRuleField(rule1, FIELD_DESCRIPTION), "newDescription"); - fieldUpdated(change, getRuleField(rule1, "effect"), ALLOW, DENY); - fieldUpdated( - change, getRuleField(rule1, "resources"), List.of(ALL_RESOURCES), List.of("table")); - fieldUpdated(change, getRuleField(rule1, "operations"), List.of(VIEW_ALL), List.of(EDIT_ALL)); - fieldAdded(change, getRuleField(rule1, "condition"), "noOwner()"); - fieldAdded(change, "rules", List.of(newRule)); + change = getChangeDescription(policy, MINOR_UPDATE); + fieldAdded(change, "rules", listOf(newRule)); policy = - patchEntityUsingFqnAndCheck( - policy, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(policy, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Delete rule1 rule // Changes from this PATCH is consolidated with the previous changes origJson = JsonUtils.pojoToJson(policy); policy.setRules(List.of(newRule)); - change = getChangeDescription(policy, CHANGE_CONSOLIDATED); + change = getChangeDescription(policy, MINOR_UPDATE); // Revert all the changes made to rule1 to the state when it was added first - rule1 = accessControlRule("rule1", List.of(ALL_RESOURCES), List.of(VIEW_ALL), ALLOW); - fieldAdded(change, "rules", List.of(newRule)); fieldDeleted(change, "rules", List.of(rule1)); - patchEntityUsingFqnAndCheck(policy, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + patchEntityUsingFqnAndCheck(policy, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } @Test diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/storages/ContainerResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/storages/ContainerResourceTest.java index 748620c0aa3..f250a8de995 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/storages/ContainerResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/storages/ContainerResourceTest.java @@ -255,6 +255,7 @@ public class ContainerResourceTest extends EntityResourceTest { // Changes from this PATCH is consolidated with the previous changes originalJson = JsonUtils.pojoToJson(role); role.setPolicies(DATA_STEWARD_ROLE.getPolicies()); - change = getChangeDescription(role, CHANGE_CONSOLIDATED); + change = getChangeDescription(role, MINOR_UPDATE); fieldDeleted(change, "policies", DATA_CONSUMER_ROLE.getPolicies()); - fieldAdded(change, "policies", DATA_STEWARD_ROLE.getPolicies()); - role = patchEntityAndCheck(role, originalJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + role = patchEntityAndCheck(role, originalJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // Remove all the policies. It should be disallowed final String originalJson1 = JsonUtils.pojoToJson(role); diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/teams/TeamResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/teams/TeamResourceTest.java index 5ce46845715..8caa04adeb4 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/teams/TeamResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/teams/TeamResourceTest.java @@ -53,7 +53,6 @@ import static org.openmetadata.service.util.TestUtils.TEST_AUTH_HEADERS; import static org.openmetadata.service.util.TestUtils.TEST_USER_NAME; import static org.openmetadata.service.util.TestUtils.USER_WITH_CREATE_HEADERS; import static org.openmetadata.service.util.TestUtils.UpdateType.MINOR_UPDATE; -import static org.openmetadata.service.util.TestUtils.UpdateType.NO_CHANGE; import static org.openmetadata.service.util.TestUtils.assertListNotNull; import static org.openmetadata.service.util.TestUtils.assertResponse; import static org.openmetadata.service.util.TestUtils.validateEntityReferences; @@ -750,8 +749,8 @@ public class TeamResourceTest extends EntityResourceTest { // Remove email from the team - changes from this PATCH and the previous are consolidated to no // change json = JsonUtils.pojoToJson(team); - change = getChangeDescription(team, NO_CHANGE); - patchEntityAndCheck(team, json, ADMIN_AUTH_HEADERS, NO_CHANGE, change); + change = getChangeDescription(team, MINOR_UPDATE); + patchEntityAndCheck(team, json, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } @Test diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/teams/UserResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/teams/UserResourceTest.java index 84de8fe69a3..32436293283 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/teams/UserResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/teams/UserResourceTest.java @@ -57,9 +57,7 @@ import static org.openmetadata.service.util.TestUtils.TEST_AUTH_HEADERS; import static org.openmetadata.service.util.TestUtils.TEST_USER_NAME; import static org.openmetadata.service.util.TestUtils.USER_WITH_CREATE_HEADERS; import static org.openmetadata.service.util.TestUtils.USER_WITH_CREATE_PERMISSION_NAME; -import static org.openmetadata.service.util.TestUtils.UpdateType.CHANGE_CONSOLIDATED; import static org.openmetadata.service.util.TestUtils.UpdateType.MINOR_UPDATE; -import static org.openmetadata.service.util.TestUtils.UpdateType.REVERT; import static org.openmetadata.service.util.TestUtils.assertDeleted; import static org.openmetadata.service.util.TestUtils.assertListNotNull; import static org.openmetadata.service.util.TestUtils.assertListNull; @@ -754,17 +752,20 @@ public class UserResourceTest extends EntityResourceTest { .withIsBot(true) .withIsAdmin(false); - change = getChangeDescription(user, CHANGE_CONSOLIDATED); + change = getChangeDescription(user, MINOR_UPDATE); fieldAdded(change, "roles", listOf(role2)); - fieldDeleted(change, "teams", listOf(ORG_TEAM.getEntityReference())); - fieldAdded(change, "teams", teams1); - fieldAdded(change, "timezone", timezone1); - fieldAdded(change, "displayName", "displayName1"); - fieldAdded(change, "profile", profile1); + fieldAdded(change, "teams", listOf(team3)); + + fieldDeleted(change, "roles", listOf(role1)); + fieldDeleted(change, "teams", listOf(team2)); + fieldDeleted(change, "personas", List.of(DATA_SCIENTIST.getEntityReference())); + + fieldUpdated(change, "displayName", "displayName", "displayName1"); + fieldUpdated(change, "profile", profile, profile1); + fieldUpdated(change, "timezone", timezone, timezone1); fieldUpdated(change, "isBot", false, true); - fieldAdded(change, "defaultPersona", DATA_SCIENTIST.getEntityReference()); - fieldAdded(change, "personas", List.of(DATA_ENGINEER.getEntityReference())); - user = patchEntityAndCheck(user, origJson, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + + user = patchEntityAndCheck(user, origJson, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); // // Remove the attributes - Consolidating changes from this patch with previous results in no @@ -780,11 +781,6 @@ public class UserResourceTest extends EntityResourceTest { .withPersonas(null) .withIsBot(null) .withIsAdmin(false); - - // Note non-empty display field is not deleted. When teams are deleted, Organization is added - // back as default team. - change = getChangeDescription(user, REVERT); - patchEntityAndCheck(user, origJson, ADMIN_AUTH_HEADERS, REVERT, change); } @Test @@ -1319,9 +1315,9 @@ public class UserResourceTest extends EntityResourceTest { // removed json = JsonUtils.pojoToJson(user); user.withProfile(null); - change = getChangeDescription(user, CHANGE_CONSOLIDATED); - fieldDeleted(change, "profile", PROFILE); - patchEntityAndCheck(user, json, ADMIN_AUTH_HEADERS, CHANGE_CONSOLIDATED, change); + change = getChangeDescription(user, MINOR_UPDATE); + fieldDeleted(change, "profile", profile1); + patchEntityAndCheck(user, json, ADMIN_AUTH_HEADERS, MINOR_UPDATE, change); } @Test diff --git a/openmetadata-spec/src/main/java/org/openmetadata/schema/EntityInterface.java b/openmetadata-spec/src/main/java/org/openmetadata/schema/EntityInterface.java index 7414dc92e75..b9add9824f7 100644 --- a/openmetadata-spec/src/main/java/org/openmetadata/schema/EntityInterface.java +++ b/openmetadata-spec/src/main/java/org/openmetadata/schema/EntityInterface.java @@ -54,6 +54,8 @@ public interface EntityInterface { ChangeDescription getChangeDescription(); + ChangeDescription getIncrementalChangeDescription(); + default List getOwners() { return null; } @@ -124,6 +126,8 @@ public interface EntityInterface { void setChangeDescription(ChangeDescription changeDescription); + void setIncrementalChangeDescription(ChangeDescription incrementalChangeDescription); + void setFullyQualifiedName(String fullyQualifiedName); default void setDeleted(Boolean flag) {} diff --git a/openmetadata-spec/src/main/resources/json/schema/analytics/webAnalyticEvent.json b/openmetadata-spec/src/main/resources/json/schema/analytics/webAnalyticEvent.json index 88d58e523e1..230284608ff 100644 --- a/openmetadata-spec/src/main/resources/json/schema/analytics/webAnalyticEvent.json +++ b/openmetadata-spec/src/main/resources/json/schema/analytics/webAnalyticEvent.json @@ -56,6 +56,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/dataInsight/custom/dataInsightCustomChart.json b/openmetadata-spec/src/main/resources/json/schema/dataInsight/custom/dataInsightCustomChart.json index 70b1aa8e59c..9af4a0c21a5 100644 --- a/openmetadata-spec/src/main/resources/json/schema/dataInsight/custom/dataInsightCustomChart.json +++ b/openmetadata-spec/src/main/resources/json/schema/dataInsight/custom/dataInsightCustomChart.json @@ -112,6 +112,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/dataInsight/dataInsightChart.json b/openmetadata-spec/src/main/resources/json/schema/dataInsight/dataInsightChart.json index d7faacf3039..69c8e2cc64c 100644 --- a/openmetadata-spec/src/main/resources/json/schema/dataInsight/dataInsightChart.json +++ b/openmetadata-spec/src/main/resources/json/schema/dataInsight/dataInsightChart.json @@ -118,6 +118,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/dataInsight/kpi/kpi.json b/openmetadata-spec/src/main/resources/json/schema/dataInsight/kpi/kpi.json index a572efb8e64..a6c5ef8201c 100644 --- a/openmetadata-spec/src/main/resources/json/schema/dataInsight/kpi/kpi.json +++ b/openmetadata-spec/src/main/resources/json/schema/dataInsight/kpi/kpi.json @@ -75,6 +75,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/applications/app.json b/openmetadata-spec/src/main/resources/json/schema/entity/applications/app.json index 191988cd598..45566963e1e 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/applications/app.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/applications/app.json @@ -147,6 +147,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/applications/marketplace/appMarketPlaceDefinition.json b/openmetadata-spec/src/main/resources/json/schema/entity/applications/marketplace/appMarketPlaceDefinition.json index 542f3ac710a..75fed9aed50 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/applications/marketplace/appMarketPlaceDefinition.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/applications/marketplace/appMarketPlaceDefinition.json @@ -56,6 +56,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/automations/workflow.json b/openmetadata-spec/src/main/resources/json/schema/entity/automations/workflow.json index 0616be5055a..ae6a1ad0490 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/automations/workflow.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/automations/workflow.json @@ -96,6 +96,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/bot.json b/openmetadata-spec/src/main/resources/json/schema/entity/bot.json index e0783961729..4b7899d115c 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/bot.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/bot.json @@ -54,6 +54,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/classification/classification.json b/openmetadata-spec/src/main/resources/json/schema/entity/classification/classification.json index 30160d3d17d..3ccca782aa2 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/classification/classification.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/classification/classification.json @@ -55,6 +55,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/classification/tag.json b/openmetadata-spec/src/main/resources/json/schema/entity/classification/tag.json index 7028d038e6b..19b5f708c25 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/classification/tag.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/classification/tag.json @@ -79,6 +79,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "provider": { "$ref": "../../type/basic.json#/definitions/providerType" }, diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/apiCollection.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/apiCollection.json index 872be7e819b..1279f0a70f3 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/apiCollection.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/apiCollection.json @@ -80,6 +80,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/apiEndpoint.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/apiEndpoint.json index 4cc518e5db5..cac17a4111b 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/apiEndpoint.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/apiEndpoint.json @@ -142,6 +142,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/chart.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/chart.json index 94addc4e76d..b3dd57dec92 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/chart.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/chart.json @@ -134,6 +134,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/container.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/container.json index 9cde15390b5..4be4d5726d5 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/container.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/container.json @@ -152,6 +152,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboard.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboard.json index 441879ab55a..15bc5a897b5 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboard.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboard.json @@ -118,6 +118,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboardDataModel.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboardDataModel.json index 80fbd1cf088..c8a744c7eb5 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboardDataModel.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/dashboardDataModel.json @@ -121,6 +121,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/database.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/database.json index a200f243f77..5c37bd12233 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/database.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/database.json @@ -87,6 +87,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "default": { "description": "Some databases don't support a database/catalog in the hierarchy and use default database. For example, `MySql`. For such databases, set this flag to true to indicate that this is a default database.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/databaseSchema.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/databaseSchema.json index 089957f161b..20b0086b138 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/databaseSchema.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/databaseSchema.json @@ -88,6 +88,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/glossary.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/glossary.json index 6d15172e658..bf5697a4563 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/glossary.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/glossary.json @@ -76,6 +76,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/glossaryTerm.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/glossaryTerm.json index 11504047e30..1fa513705a6 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/glossaryTerm.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/glossaryTerm.json @@ -122,6 +122,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "status": { "description": "Status of the glossary term.", "$ref": "#/definitions/status" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/metric.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/metric.json index ce682887b0c..f2464800660 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/metric.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/metric.json @@ -175,6 +175,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/mlmodel.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/mlmodel.json index e8e9d5710d7..5dd61e3bed4 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/mlmodel.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/mlmodel.json @@ -256,6 +256,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json index cd745c67894..16577ceca6f 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/pipeline.json @@ -245,6 +245,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/query.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/query.json index 7764d003708..7fc87eddc85 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/query.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/query.json @@ -47,6 +47,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "owners": { "description": "Owners of this Query.", "$ref": "../../type/entityReferenceList.json", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/report.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/report.json index 357f7388528..279cafd13c7 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/report.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/report.json @@ -60,6 +60,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/searchIndex.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/searchIndex.json index 75271a7b60f..477d99eacf8 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/searchIndex.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/searchIndex.json @@ -241,6 +241,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/storedProcedure.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/storedProcedure.json index 416558e9b46..9c8273d74a1 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/storedProcedure.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/storedProcedure.json @@ -123,6 +123,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "databaseSchema": { "description": "Reference to Database Schema that contains this stored procedure.", "$ref": "../../type/entityReference.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json index d7e26c64432..9c99fffc38a 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/table.json @@ -1097,6 +1097,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/data/topic.json b/openmetadata-spec/src/main/resources/json/schema/entity/data/topic.json index e2eb25dfd08..36bd57495fc 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/data/topic.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/data/topic.json @@ -145,6 +145,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/docStore/document.json b/openmetadata-spec/src/main/resources/json/schema/entity/docStore/document.json index 9a402b2438f..df92347d71d 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/docStore/document.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/docStore/document.json @@ -55,6 +55,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "href": { "description": "Link to the resource corresponding to this entity.", "$ref": "../../type/basic.json#/definitions/href" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/domains/dataProduct.json b/openmetadata-spec/src/main/resources/json/schema/entity/domains/dataProduct.json index da5df09827f..77184d01d3e 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/domains/dataProduct.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/domains/dataProduct.json @@ -68,6 +68,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "extension": { "description": "Entity extension data with custom attributes added to the entity.", "$ref": "../../type/basic.json#/definitions/entityExtension" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/domains/domain.json b/openmetadata-spec/src/main/resources/json/schema/entity/domains/domain.json index fa059ff2a42..b343417d3f4 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/domains/domain.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/domains/domain.json @@ -85,6 +85,10 @@ "changeDescription": { "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" } }, "required": ["id", "name", "description", "domainType"], diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/policies/policy.json b/openmetadata-spec/src/main/resources/json/schema/entity/policies/policy.json index be8bbb612d0..7b862bf6e52 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/policies/policy.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/policies/policy.json @@ -66,6 +66,10 @@ "description": "Change that led to this version of the Policy.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "rules": { "description": "Set of rules that the policy contains.", "$ref": "#/definitions/rules" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/apiService.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/apiService.json index 31ffeaf4ece..6dd83f0e924 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/apiService.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/apiService.json @@ -117,6 +117,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/testConnectionDefinition.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/testConnectionDefinition.json index d36b66bed86..b816ecc7d9b 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/testConnectionDefinition.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/testConnectionDefinition.json @@ -92,6 +92,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/dashboardService.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/dashboardService.json index 8bb69c03ffd..f08d793b679 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/dashboardService.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/dashboardService.json @@ -216,6 +216,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/databaseService.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/databaseService.json index 1de1f882adc..07adf9f0daa 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/databaseService.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/databaseService.json @@ -419,6 +419,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/ingestionPipelines/ingestionPipeline.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/ingestionPipelines/ingestionPipeline.json index 2bad77cd45e..7a978890884 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/ingestionPipelines/ingestionPipeline.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/ingestionPipelines/ingestionPipeline.json @@ -206,6 +206,10 @@ "description": "Change that led to this version of the entity.", "$ref": "../../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/messagingService.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/messagingService.json index 380d6641607..8e63fe8b1c6 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/messagingService.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/messagingService.json @@ -135,6 +135,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/metadataService.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/metadataService.json index 179a81e7c84..690d09472ab 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/metadataService.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/metadataService.json @@ -139,6 +139,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/mlmodelService.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/mlmodelService.json index a91ce2a5d8b..5de1ef0fbd0 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/mlmodelService.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/mlmodelService.json @@ -133,6 +133,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/pipelineService.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/pipelineService.json index 88e23951d33..87337169d1d 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/pipelineService.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/pipelineService.json @@ -232,6 +232,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/searchService.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/searchService.json index 824ba6365c4..a34de22ae35 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/searchService.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/searchService.json @@ -127,6 +127,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/storageService.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/storageService.json index def9706ff0e..33bd9bbb30e 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/storageService.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/storageService.json @@ -134,6 +134,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/teams/persona.json b/openmetadata-spec/src/main/resources/json/schema/entity/teams/persona.json index bc941e871fa..63a082512a1 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/teams/persona.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/teams/persona.json @@ -55,6 +55,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "domain" : { "description": "Domain the asset belongs to. When not set, the asset inherits the domain from the parent it belongs to.", "$ref": "../../type/entityReference.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/teams/role.json b/openmetadata-spec/src/main/resources/json/schema/entity/teams/role.json index 6a852a95979..80ec04ccb98 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/teams/role.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/teams/role.json @@ -48,6 +48,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "allowDelete" : { "description": "Some system roles can't be deleted", "type" : "boolean" diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/teams/team.json b/openmetadata-spec/src/main/resources/json/schema/entity/teams/team.json index d3fb777f2cf..d37c656fa56 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/teams/team.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/teams/team.json @@ -107,6 +107,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/teams/user.json b/openmetadata-spec/src/main/resources/json/schema/entity/teams/user.json index 49ba338bf3a..a94f43e44e5 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/teams/user.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/teams/user.json @@ -119,6 +119,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/type.json b/openmetadata-spec/src/main/resources/json/schema/entity/type.json index e5efca42f77..3098bbccaa3 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/type.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/type.json @@ -87,6 +87,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../type/entityHistory.json#/definitions/changeDescription" + }, "domain" : { "description": "Domain the asset belongs to. When not set, the asset inherits the domain from the parent it belongs to.", "$ref": "../type/entityReference.json" diff --git a/openmetadata-spec/src/main/resources/json/schema/events/eventSubscription.json b/openmetadata-spec/src/main/resources/json/schema/events/eventSubscription.json index e0dbc7770b0..dae3250fc25 100644 --- a/openmetadata-spec/src/main/resources/json/schema/events/eventSubscription.json +++ b/openmetadata-spec/src/main/resources/json/schema/events/eventSubscription.json @@ -279,6 +279,10 @@ "description": "Change that led to this version of the Event Subscription.", "$ref": "../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../type/entityHistory.json#/definitions/changeDescription" + }, "alertType": { "description": "Type of Alert", "$ref": "#/definitions/alertType" diff --git a/openmetadata-spec/src/main/resources/json/schema/governance/workflows/workflowDefinition.json b/openmetadata-spec/src/main/resources/json/schema/governance/workflows/workflowDefinition.json index 11ac55dbc4b..9b8092942b1 100644 --- a/openmetadata-spec/src/main/resources/json/schema/governance/workflows/workflowDefinition.json +++ b/openmetadata-spec/src/main/resources/json/schema/governance/workflows/workflowDefinition.json @@ -62,6 +62,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/tests/testCase.json b/openmetadata-spec/src/main/resources/json/schema/tests/testCase.json index 7d79359093a..33df22b9498 100644 --- a/openmetadata-spec/src/main/resources/json/schema/tests/testCase.json +++ b/openmetadata-spec/src/main/resources/json/schema/tests/testCase.json @@ -105,6 +105,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/tests/testDefinition.json b/openmetadata-spec/src/main/resources/json/schema/tests/testDefinition.json index 67b27d937c6..07f0bcaf800 100644 --- a/openmetadata-spec/src/main/resources/json/schema/tests/testDefinition.json +++ b/openmetadata-spec/src/main/resources/json/schema/tests/testDefinition.json @@ -193,6 +193,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/tests/testSuite.json b/openmetadata-spec/src/main/resources/json/schema/tests/testSuite.json index 87d7ab558d1..66fe2cbc391 100644 --- a/openmetadata-spec/src/main/resources/json/schema/tests/testSuite.json +++ b/openmetadata-spec/src/main/resources/json/schema/tests/testSuite.json @@ -115,6 +115,10 @@ "description": "Change that lead to this version of the entity.", "$ref": "../type/entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../type/entityHistory.json#/definitions/changeDescription" + }, "deleted": { "description": "When `true` indicates the entity has been soft deleted.", "type": "boolean", diff --git a/openmetadata-spec/src/main/resources/json/schema/type/changeEvent.json b/openmetadata-spec/src/main/resources/json/schema/type/changeEvent.json index 472df609634..aa79aa817dd 100644 --- a/openmetadata-spec/src/main/resources/json/schema/type/changeEvent.json +++ b/openmetadata-spec/src/main/resources/json/schema/type/changeEvent.json @@ -49,6 +49,10 @@ "description": "For `eventType` `entityUpdated` this field captures details about what fields were added/updated/deleted. For `eventType` `entityCreated` or `entityDeleted` this field is null.", "$ref": "entityHistory.json#/definitions/changeDescription" }, + "incrementalChangeDescription": { + "description": "Change that lead to this version of the entity.", + "$ref": "../type/entityHistory.json#/definitions/changeDescription" + }, "entity": { "description": "For `eventType` `entityCreated`, this field captures JSON coded string of the entity using the schema corresponding to `entityType`." } diff --git a/openmetadata-spec/src/main/resources/json/schema/type/entityHistory.json b/openmetadata-spec/src/main/resources/json/schema/type/entityHistory.json index 08b36f2e573..c2ca7fcbf14 100644 --- a/openmetadata-spec/src/main/resources/json/schema/type/entityHistory.json +++ b/openmetadata-spec/src/main/resources/json/schema/type/entityHistory.json @@ -65,6 +65,39 @@ } }, "additionalProperties": false + }, + "incrementalChangeDescription": { + "description": "Description of the change.", + "type": "object", + "javaType": "org.openmetadata.schema.type.ChangeDescription", + "properties": { + "fieldsAdded": { + "description": "Names of fields added during the version changes.", + "type": "array", + "items": { + "$ref": "#/definitions/fieldChange" + } + }, + "fieldsUpdated": { + "description": "Fields modified during the version changes with old and new values.", + "type": "array", + "items": { + "$ref": "#/definitions/fieldChange" + } + }, + "fieldsDeleted": { + "description": "Fields deleted during the version changes with old value before deleted.", + "type": "array", + "items": { + "$ref": "#/definitions/fieldChange" + } + }, + "previousVersion": { + "description": "When a change did not result in change, this could be same as the current version.", + "$ref": "#/definitions/entityVersion" + } + }, + "additionalProperties": false } }, "properties": { diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AdvancedSearch.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AdvancedSearch.spec.ts index 8f04b37c7e9..aa24a8b0f6b 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AdvancedSearch.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AdvancedSearch.spec.ts @@ -13,6 +13,7 @@ import test from '@playwright/test'; import { SidebarItem } from '../../constant/sidebar'; import { EntityDataClass } from '../../support/entity/EntityDataClass'; +import { EntityDataClassCreationConfig } from '../../support/entity/EntityDataClass.interface'; import { TableClass } from '../../support/entity/TableClass'; import { Glossary } from '../../support/glossary/Glossary'; import { GlossaryTerm } from '../../support/glossary/GlossaryTerm'; @@ -32,6 +33,18 @@ test.describe.configure({ timeout: 4 * 60 * 1000, }); +const creationConfig: EntityDataClassCreationConfig = { + table: true, + topic: true, + dashboard: true, + mlModel: true, + pipeline: true, + dashboardDataModel: true, + apiCollection: true, + searchIndex: true, + container: true, +}; + const user = new UserClass(); const table = new TableClass(undefined, 'Regular'); let glossaryEntity: Glossary; @@ -44,7 +57,7 @@ test.describe('Advanced Search', { tag: '@advanced-search' }, () => { test.beforeAll('Setup pre-requests', async ({ browser }) => { const { page, apiContext, afterAction } = await createNewPage(browser); - await EntityDataClass.preRequisitesForTests(apiContext); + await EntityDataClass.preRequisitesForTests(apiContext, creationConfig); await user.create(apiContext); glossaryEntity = new Glossary(undefined, [ { @@ -234,7 +247,7 @@ test.describe('Advanced Search', { tag: '@advanced-search' }, () => { test.afterAll('Cleanup', async ({ browser }) => { const { apiContext, afterAction } = await createNewPage(browser); - await EntityDataClass.postRequisitesForTests(apiContext); + await EntityDataClass.postRequisitesForTests(apiContext, creationConfig); await glossaryEntity.delete(apiContext); await user.delete(apiContext); await table.delete(apiContext); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ClassificationVersionPage.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ClassificationVersionPage.spec.ts index e67283bd2dc..6397dbd8005 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ClassificationVersionPage.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ClassificationVersionPage.spec.ts @@ -80,12 +80,12 @@ test('Classification version page', async ({ page }) => { await patchClassificationResponse; // Verify disabled state - await page.click('[data-testid="version-button"]:has-text("0.3")'); + await page.click('[data-testid="version-button"]:has-text("0.2")'); await expect(page.locator('[data-testid="disabled"]')).toBeVisible(); // Toggle back to enabled - await page.click('[data-testid="version-button"]:has-text("0.3")'); + await page.click('[data-testid="version-button"]:has-text("0.2")'); await page.click('[data-testid="manage-button"]'); const patchClassificationResponse2 = page.waitForResponse( `/api/v1/classifications/${classification.responseData?.id}` @@ -94,7 +94,7 @@ test('Classification version page', async ({ page }) => { await patchClassificationResponse2; // Verify enabled state - await page.click('[data-testid="version-button"]:has-text("0.4")'); + await page.click('[data-testid="version-button"]:has-text("0.2")'); await expect( page.locator(`[data-testid="classification-${classification.data.name}"]`) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts index 2cd3f8f82d8..7c11292a4ad 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts @@ -11,17 +11,9 @@ * limitations under the License. */ import test, { expect } from '@playwright/test'; -import { ApiEndpointClass } from '../../support/entity/ApiEndpointClass'; -import { ContainerClass } from '../../support/entity/ContainerClass'; -import { DashboardClass } from '../../support/entity/DashboardClass'; -import { DashboardDataModelClass } from '../../support/entity/DashboardDataModelClass'; import { EntityDataClass } from '../../support/entity/EntityDataClass'; -import { MlModelClass } from '../../support/entity/MlModelClass'; -import { PipelineClass } from '../../support/entity/PipelineClass'; -import { SearchIndexClass } from '../../support/entity/SearchIndexClass'; -import { StoredProcedureClass } from '../../support/entity/StoredProcedureClass'; +import { EntityDataClassCreationConfig } from '../../support/entity/EntityDataClass.interface'; import { TableClass } from '../../support/entity/TableClass'; -import { TopicClass } from '../../support/entity/TopicClass'; import { createNewPage, descriptionBoxReadOnly, @@ -30,32 +22,48 @@ import { } from '../../utils/common'; import { addMultiOwner, assignTier } from '../../utils/entity'; +const entityCreationConfig: EntityDataClassCreationConfig = { + apiEndpoint: true, + table: true, + storedProcedure: true, + dashboard: true, + pipeline: true, + topic: true, + mlModel: true, + container: true, + searchIndex: true, + dashboardDataModel: true, +}; + const entities = [ - ApiEndpointClass, - TableClass, - StoredProcedureClass, - DashboardClass, - PipelineClass, - TopicClass, - MlModelClass, - ContainerClass, - SearchIndexClass, - DashboardDataModelClass, -] as const; + EntityDataClass.apiEndpoint1, + EntityDataClass.table1, + EntityDataClass.storedProcedure1, + EntityDataClass.dashboard1, + EntityDataClass.pipeline1, + EntityDataClass.topic1, + EntityDataClass.mlModel1, + EntityDataClass.container1, + EntityDataClass.searchIndex1, + EntityDataClass.dashboardDataModel1, +]; // use the admin user to login test.use({ storageState: 'playwright/.auth/admin.json' }); -entities.forEach((EntityClass) => { - const entity = new EntityClass(); +test.describe('Entity Version pages', () => { + test.beforeAll('Setup pre-requests', async ({ browser }) => { + test.slow(); - test.describe(entity.getType(), () => { - test.beforeAll('Setup pre-requests', async ({ browser }) => { - const { apiContext, afterAction } = await createNewPage(browser); + const { apiContext, afterAction } = await createNewPage(browser); - await EntityDataClass.preRequisitesForTests(apiContext); - await entity.create(apiContext); - const domain = EntityDataClass.domain1.responseData; + await EntityDataClass.preRequisitesForTests( + apiContext, + entityCreationConfig + ); + const domain = EntityDataClass.domain1.responseData; + + for (const entity of entities) { await entity.patch({ apiContext, patchData: [ @@ -96,23 +104,29 @@ entities.forEach((EntityClass) => { }, ], }); + } - await afterAction(); - }); + await afterAction(); + }); - test.beforeEach('Visit entity details page', async ({ page }) => { - await redirectToHomePage(page); + test.beforeEach('Visit entity details page', async ({ page }) => { + await redirectToHomePage(page); + }); + + test.afterAll('Cleanup', async ({ browser }) => { + test.slow(); + + const { apiContext, afterAction } = await createNewPage(browser); + await EntityDataClass.postRequisitesForTests( + apiContext, + entityCreationConfig + ); + await afterAction(); + }); + + entities.forEach((entity) => { + test(`${entity.getType()}`, async ({ page }) => { await entity.visitEntityPage(page); - }); - - test.afterAll('Cleanup', async ({ browser }) => { - const { apiContext, afterAction } = await createNewPage(browser); - await entity.delete(apiContext); - await EntityDataClass.postRequisitesForTests(apiContext); - await afterAction(); - }); - - test('Version page', async ({ page }) => { const versionDetailResponse = page.waitForResponse(`**/versions/0.2`); await page.locator('[data-testid="version-button"]').click(); await versionDetailResponse; @@ -178,7 +192,9 @@ entities.forEach((EntityClass) => { await page .locator( - `[data-row-key$="${entity.entityResponseData?.['columns'][0].name}"] [data-testid="edit-displayName-button"]` + `[data-row-key$="${ + (entity as TableClass).entity.columns[0].name + }"] [data-testid="edit-displayName-button"]` ) .click(); @@ -197,7 +213,9 @@ entities.forEach((EntityClass) => { await expect( page.locator( - `[data-row-key$="${entity.entityResponseData?.['columns'][0].name}"] [data-testid="diff-added"]` + `[data-row-key$="${ + (entity as TableClass).entity.columns[0].name + }"] [data-testid="diff-added"]` ) ).toBeVisible(); } diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/GlossaryVersionPage.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/GlossaryVersionPage.spec.ts similarity index 98% rename from openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/GlossaryVersionPage.spec.ts rename to openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/GlossaryVersionPage.spec.ts index a5f16c6afc8..18294767db3 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/GlossaryVersionPage.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/GlossaryVersionPage.spec.ts @@ -89,7 +89,7 @@ test('Glossary', async ({ page }) => { await page.reload(); const versionPageResponse = page.waitForResponse( - `/api/v1/glossaries/${glossary.responseData.id}/versions/0.3` + `/api/v1/glossaries/${glossary.responseData.id}/versions/0.2` ); await page.click('[data-testid="version-button"]'); await versionPageResponse; @@ -199,10 +199,14 @@ test('GlossaryTerm', async ({ page }) => { ) ).toBeVisible(); + await page.waitForLoadState('networkidle'); + const glossaryTermsRes = page.waitForResponse( '/api/v1/glossaryTerms/name/**' ); await page.click('[data-testid="version-button"]'); + + await page.waitForLoadState('networkidle'); await glossaryTermsRes; await addMultiOwner({ diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ServiceEntityVersionPage.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ServiceEntityVersionPage.spec.ts index 35bed8e1580..66c6d795874 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ServiceEntityVersionPage.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ServiceEntityVersionPage.spec.ts @@ -11,18 +11,8 @@ * limitations under the License. */ import test, { expect } from '@playwright/test'; -import { ApiCollectionClass } from '../../support/entity/ApiCollectionClass'; -import { DatabaseClass } from '../../support/entity/DatabaseClass'; -import { DatabaseSchemaClass } from '../../support/entity/DatabaseSchemaClass'; import { EntityDataClass } from '../../support/entity/EntityDataClass'; -import { ApiServiceClass } from '../../support/entity/service/ApiServiceClass'; -import { DashboardServiceClass } from '../../support/entity/service/DashboardServiceClass'; -import { DatabaseServiceClass } from '../../support/entity/service/DatabaseServiceClass'; -import { MessagingServiceClass } from '../../support/entity/service/MessagingServiceClass'; -import { MlmodelServiceClass } from '../../support/entity/service/MlmodelServiceClass'; -import { PipelineServiceClass } from '../../support/entity/service/PipelineServiceClass'; -import { SearchIndexServiceClass } from '../../support/entity/service/SearchIndexServiceClass'; -import { StorageServiceClass } from '../../support/entity/service/StorageServiceClass'; +import { EntityDataClassCreationConfig } from '../../support/entity/EntityDataClass.interface'; import { createNewPage, descriptionBoxReadOnly, @@ -31,32 +21,49 @@ import { } from '../../utils/common'; import { addMultiOwner, assignTier } from '../../utils/entity'; +const entityCreationConfig: EntityDataClassCreationConfig = { + apiService: true, + apiCollection: true, + databaseService: true, + dashboardService: true, + messagingService: true, + database: true, + databaseSchema: true, + mlmodelService: true, + pipelineService: true, + searchIndexService: true, + storageService: true, +}; + const entities = [ - ApiServiceClass, - ApiCollectionClass, - DatabaseServiceClass, - DashboardServiceClass, - MessagingServiceClass, - MlmodelServiceClass, - PipelineServiceClass, - SearchIndexServiceClass, - StorageServiceClass, - DatabaseClass, - DatabaseSchemaClass, -] as const; + EntityDataClass.apiService, + EntityDataClass.apiCollection1, + EntityDataClass.databaseService, + EntityDataClass.dashboardService, + EntityDataClass.messagingService, + EntityDataClass.mlmodelService, + EntityDataClass.pipelineService, + EntityDataClass.searchIndexService, + EntityDataClass.storageService, + EntityDataClass.database, + EntityDataClass.databaseSchema, +]; // use the admin user to login test.use({ storageState: 'playwright/.auth/admin.json' }); -entities.forEach((EntityClass) => { - const entity = new EntityClass(); +test.describe('Service Version pages', () => { + test.beforeAll('Setup pre-requests', async ({ browser }) => { + test.slow(); - test.describe(entity.getType(), () => { - test.beforeAll('Setup pre-requests', async ({ browser }) => { - const { apiContext, afterAction } = await createNewPage(browser); + const { apiContext, afterAction } = await createNewPage(browser); - await EntityDataClass.preRequisitesForTests(apiContext); - await entity.create(apiContext); + await EntityDataClass.preRequisitesForTests( + apiContext, + entityCreationConfig + ); + + for (const entity of entities) { const domain = EntityDataClass.domain1.responseData; await entity.patch(apiContext, [ { @@ -95,23 +102,29 @@ entities.forEach((EntityClass) => { }, }, ]); + } - await afterAction(); - }); + await afterAction(); + }); - test.beforeEach('Visit entity details page', async ({ page }) => { - await redirectToHomePage(page); + test.afterAll('Cleanup', async ({ browser }) => { + test.slow(); + + const { apiContext, afterAction } = await createNewPage(browser); + await EntityDataClass.postRequisitesForTests( + apiContext, + entityCreationConfig + ); + await afterAction(); + }); + + test.beforeEach('Visit entity details page', async ({ page }) => { + await redirectToHomePage(page); + }); + + entities.forEach((entity) => { + test(`${entity.getType()}`, async ({ page }) => { await entity.visitEntityPage(page); - }); - - test.afterAll('Cleanup', async ({ browser }) => { - const { apiContext, afterAction } = await createNewPage(browser); - await entity.delete(apiContext); - await EntityDataClass.postRequisitesForTests(apiContext); - await afterAction(); - }); - - test('Version page', async ({ page }) => { const versionDetailResponse = page.waitForResponse(`**/versions/0.2`); await page.locator('[data-testid="version-button"]').click(); await versionDetailResponse; @@ -158,7 +171,7 @@ entities.forEach((EntityClass) => { type: 'Users', }); - const versionDetailResponse = page.waitForResponse(`**/versions/0.3`); + const versionDetailResponse = page.waitForResponse(`**/versions/0.2`); await page.locator('[data-testid="version-button"]').click(); await versionDetailResponse; @@ -174,7 +187,7 @@ entities.forEach((EntityClass) => { await assignTier(page, 'Tier1', entity.endpoint); - const versionDetailResponse = page.waitForResponse(`**/versions/0.4`); + const versionDetailResponse = page.waitForResponse(`**/versions/0.2`); await page.locator('[data-testid="version-button"]').click(); await versionDetailResponse; @@ -211,7 +224,7 @@ entities.forEach((EntityClass) => { await expect(deletedBadge).toHaveText('Deleted'); - const versionDetailResponse = page.waitForResponse(`**/versions/0.5`); + const versionDetailResponse = page.waitForResponse(`**/versions/0.3`); await page.locator('[data-testid="version-button"]').click(); await versionDetailResponse; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ApiCollectionClass.ts b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ApiCollectionClass.ts index 381763afe7d..ab38451bf9f 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ApiCollectionClass.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ApiCollectionClass.ts @@ -185,7 +185,7 @@ export class ApiCollectionClass extends EntityClass { async patch(apiContext: APIRequestContext, payload: Operation[]) { const apiCollectionResponse = await apiContext.patch( - `/api/v1/apiCollections/${this.entityResponseData?.['id']}`, + `/api/v1/apiCollections/name/${this.entityResponseData?.['fullyQualifiedName']}`, { data: payload, headers: { diff --git a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.interface.ts b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.interface.ts new file mode 100644 index 00000000000..c222e398888 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.interface.ts @@ -0,0 +1,36 @@ +/* + * Copyright 2025 Collate. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export interface EntityDataClassCreationConfig { + all?: boolean; + table?: boolean; + topic?: boolean; + dashboard?: boolean; + mlModel?: boolean; + pipeline?: boolean; + dashboardDataModel?: boolean; + apiCollection?: boolean; + apiEndpoint?: boolean; + storedProcedure?: boolean; + searchIndex?: boolean; + container?: boolean; + databaseService?: boolean; + database?: boolean; + databaseSchema?: boolean; + apiService?: boolean; + dashboardService?: boolean; + messagingService?: boolean; + mlmodelService?: boolean; + pipelineService?: boolean; + searchIndexService?: boolean; + storageService?: boolean; +} diff --git a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.ts b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.ts index 44e0eb9036f..57295983a41 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.ts @@ -18,12 +18,25 @@ import { TagClass } from '../tag/TagClass'; import { TeamClass } from '../team/TeamClass'; import { UserClass } from '../user/UserClass'; import { ApiCollectionClass } from './ApiCollectionClass'; +import { ApiEndpointClass } from './ApiEndpointClass'; import { ContainerClass } from './ContainerClass'; import { DashboardClass } from './DashboardClass'; import { DashboardDataModelClass } from './DashboardDataModelClass'; +import { DatabaseClass } from './DatabaseClass'; +import { DatabaseSchemaClass } from './DatabaseSchemaClass'; +import { EntityDataClassCreationConfig } from './EntityDataClass.interface'; import { MlModelClass } from './MlModelClass'; import { PipelineClass } from './PipelineClass'; import { SearchIndexClass } from './SearchIndexClass'; +import { ApiServiceClass } from './service/ApiServiceClass'; +import { DashboardServiceClass } from './service/DashboardServiceClass'; +import { DatabaseServiceClass } from './service/DatabaseServiceClass'; +import { MessagingServiceClass } from './service/MessagingServiceClass'; +import { MlmodelServiceClass } from './service/MlmodelServiceClass'; +import { PipelineServiceClass } from './service/PipelineServiceClass'; +import { SearchIndexServiceClass } from './service/SearchIndexServiceClass'; +import { StorageServiceClass } from './service/StorageServiceClass'; +import { StoredProcedureClass } from './StoredProcedureClass'; import { TableClass } from './TableClass'; import { TopicClass } from './TopicClass'; @@ -55,12 +68,29 @@ export class EntityDataClass { static readonly dashboardDataModel2 = new DashboardDataModelClass(); static readonly apiCollection1 = new ApiCollectionClass(); static readonly apiCollection2 = new ApiCollectionClass(); + static readonly apiEndpoint1 = new ApiEndpointClass(); + static readonly apiEndpoint2 = new ApiEndpointClass(); + static readonly storedProcedure1 = new StoredProcedureClass(); + static readonly storedProcedure2 = new StoredProcedureClass(); static readonly searchIndex1 = new SearchIndexClass(); static readonly searchIndex2 = new SearchIndexClass(); static readonly container1 = new ContainerClass(); static readonly container2 = new ContainerClass(); + static readonly databaseService = new DatabaseServiceClass(); + static readonly database = new DatabaseClass(); + static readonly databaseSchema = new DatabaseSchemaClass(); + static readonly apiService = new ApiServiceClass(); + static readonly dashboardService = new DashboardServiceClass(); + static readonly messagingService = new MessagingServiceClass(); + static readonly mlmodelService = new MlmodelServiceClass(); + static readonly pipelineService = new PipelineServiceClass(); + static readonly searchIndexService = new SearchIndexServiceClass(); + static readonly storageService = new StorageServiceClass(); - static async preRequisitesForTests(apiContext: APIRequestContext) { + static async preRequisitesForTests( + apiContext: APIRequestContext, + creationConfig?: EntityDataClassCreationConfig + ) { // Add pre-requisites for tests await this.domain1.create(apiContext); await this.domain2.create(apiContext); @@ -75,27 +105,89 @@ export class EntityDataClass { await this.team2.create(apiContext); await this.tierTag1.create(apiContext); await this.tierTag2.create(apiContext); - await this.table1.create(apiContext); - await this.table2.create(apiContext); - await this.topic1.create(apiContext); - await this.topic2.create(apiContext); - await this.dashboard1.create(apiContext); - await this.dashboard2.create(apiContext); - await this.mlModel1.create(apiContext); - await this.mlModel2.create(apiContext); - await this.pipeline1.create(apiContext); - await this.pipeline2.create(apiContext); - await this.dashboardDataModel1.create(apiContext); - await this.dashboardDataModel2.create(apiContext); - await this.apiCollection1.create(apiContext); - await this.apiCollection2.create(apiContext); - await this.searchIndex1.create(apiContext); - await this.searchIndex2.create(apiContext); - await this.container1.create(apiContext); - await this.container2.create(apiContext); + + + if (creationConfig?.all || creationConfig?.table) { + await this.table1.create(apiContext); + await this.table2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.topic) { + await this.topic1.create(apiContext); + await this.topic2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.dashboard) { + await this.dashboard1.create(apiContext); + await this.dashboard2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.mlModel) { + await this.mlModel1.create(apiContext); + await this.mlModel2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.pipeline) { + await this.pipeline1.create(apiContext); + await this.pipeline2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.dashboardDataModel) { + await this.dashboardDataModel1.create(apiContext); + await this.dashboardDataModel2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.apiCollection) { + await this.apiCollection1.create(apiContext); + await this.apiCollection2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.apiEndpoint) { + await this.apiEndpoint1.create(apiContext); + await this.apiEndpoint2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.storedProcedure) { + await this.storedProcedure1.create(apiContext); + await this.storedProcedure2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.searchIndex) { + await this.searchIndex1.create(apiContext); + await this.searchIndex2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.container) { + await this.container1.create(apiContext); + await this.container2.create(apiContext); + } + if (creationConfig?.all || creationConfig?.databaseService) { + await this.databaseService.create(apiContext); + } + if (creationConfig?.all || creationConfig?.database) { + await this.database.create(apiContext); + } + if (creationConfig?.all || creationConfig?.databaseSchema) { + await this.databaseSchema.create(apiContext); + } + if (creationConfig?.all || creationConfig?.apiService) { + await this.apiService.create(apiContext); + } + if (creationConfig?.all || creationConfig?.dashboardService) { + await this.dashboardService.create(apiContext); + } + if (creationConfig?.all || creationConfig?.messagingService) { + await this.messagingService.create(apiContext); + } + if (creationConfig?.all || creationConfig?.mlmodelService) { + await this.mlmodelService.create(apiContext); + } + if (creationConfig?.all || creationConfig?.pipelineService) { + await this.pipelineService.create(apiContext); + } + if (creationConfig?.all || creationConfig?.searchIndexService) { + await this.searchIndexService.create(apiContext); + } + if (creationConfig?.all || creationConfig?.storageService) { + await this.storageService.create(apiContext); + } + } - static async postRequisitesForTests(apiContext: APIRequestContext) { + static async postRequisitesForTests( + apiContext: APIRequestContext, + creationConfig?: EntityDataClassCreationConfig + ) { // Add post-requisites for tests await this.domain1.delete(apiContext); await this.domain2.delete(apiContext); @@ -109,23 +201,82 @@ export class EntityDataClass { await this.team2.delete(apiContext); await this.tierTag1.delete(apiContext); await this.tierTag2.delete(apiContext); - await this.table1.delete(apiContext); - await this.table2.delete(apiContext); - await this.topic1.delete(apiContext); - await this.topic2.delete(apiContext); - await this.dashboard1.delete(apiContext); - await this.dashboard2.delete(apiContext); - await this.mlModel1.delete(apiContext); - await this.mlModel2.delete(apiContext); - await this.pipeline1.delete(apiContext); - await this.pipeline2.delete(apiContext); - await this.dashboardDataModel1.delete(apiContext); - await this.dashboardDataModel2.delete(apiContext); - await this.apiCollection1.delete(apiContext); - await this.apiCollection2.delete(apiContext); - await this.searchIndex1.delete(apiContext); - await this.searchIndex2.delete(apiContext); - await this.container1.delete(apiContext); - await this.container2.delete(apiContext); + + + if (creationConfig?.all || creationConfig?.table) { + await this.table1.delete(apiContext); + await this.table2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.topic) { + await this.topic1.delete(apiContext); + await this.topic2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.dashboard) { + await this.dashboard1.delete(apiContext); + await this.dashboard2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.mlModel) { + await this.mlModel1.delete(apiContext); + await this.mlModel2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.pipeline) { + await this.pipeline1.delete(apiContext); + await this.pipeline2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.dashboardDataModel) { + await this.dashboardDataModel1.delete(apiContext); + await this.dashboardDataModel2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.apiCollection) { + await this.apiCollection1.delete(apiContext); + await this.apiCollection2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.apiEndpoint) { + await this.apiEndpoint1.delete(apiContext); + await this.apiEndpoint2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.storedProcedure) { + await this.storedProcedure1.delete(apiContext); + await this.storedProcedure2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.searchIndex) { + await this.searchIndex1.delete(apiContext); + await this.searchIndex2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.container) { + await this.container1.delete(apiContext); + await this.container2.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.databaseService) { + await this.databaseService.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.database) { + await this.database.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.databaseSchema) { + await this.databaseSchema.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.apiService) { + await this.apiService.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.dashboardService) { + await this.dashboardService.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.messagingService) { + await this.messagingService.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.mlmodelService) { + await this.mlmodelService.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.pipelineService) { + await this.pipelineService.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.searchIndexService) { + await this.searchIndexService.delete(apiContext); + } + if (creationConfig?.all || creationConfig?.storageService) { + await this.storageService.delete(apiContext); + } + } } diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/analytics/webAnalyticEvent.ts b/openmetadata-ui/src/main/resources/ui/src/generated/analytics/webAnalyticEvent.ts index 6d579baa89c..e431758f8dc 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/analytics/webAnalyticEvent.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/analytics/webAnalyticEvent.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * Web Analytic Event */ export interface WebAnalyticEvent { @@ -57,6 +55,10 @@ export interface WebAnalyticEvent { * Unique identifier of the report. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this event. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/custom/dataInsightCustomChart.ts b/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/custom/dataInsightCustomChart.ts index c1cbb708ffb..ecddf33c99b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/custom/dataInsightCustomChart.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/custom/dataInsightCustomChart.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * DI Chart Entity */ export interface DataInsightCustomChart { @@ -53,6 +51,10 @@ export interface DataInsightCustomChart { * Unique identifier of this table instance. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Flag to indicate if the chart is system generated or user created. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/dataInsightChart.ts b/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/dataInsightChart.ts index 2a076c3c606..9c9120748f6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/dataInsightChart.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/dataInsightChart.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * DataInsightChart represents the definition of a chart with its parameters */ export interface DataInsightChart { @@ -50,8 +48,12 @@ export interface DataInsightChart { /** * Unique identifier of this table instance. */ - id?: string; - metrics?: ChartParameterValues[]; + id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; + metrics?: ChartParameterValues[]; /** * Name that identifies this data insight chart. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/kpi/kpi.ts b/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/kpi/kpi.ts index 54e3549daeb..99d271bb73e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/kpi/kpi.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/dataInsight/kpi/kpi.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `KIP` entity defines a metric and a target. */ export interface Kpi { @@ -57,6 +55,10 @@ export interface Kpi { * Unique identifier of this KPI Definition instance. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Result of the Kpi */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/app.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/app.ts index 1192a2b347a..2cc2bce2cf1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/app.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/app.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the applications for Open-Metadata. */ export interface App { @@ -98,6 +96,10 @@ export interface App { * Unique identifier of this application. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name of the Application. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/marketplace/appMarketPlaceDefinition.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/marketplace/appMarketPlaceDefinition.ts index 8a5c3a496ff..bc105bfe0aa 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/marketplace/appMarketPlaceDefinition.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/marketplace/appMarketPlaceDefinition.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the applications for Open-Metadata. */ export interface AppMarketPlaceDefinition { @@ -90,6 +88,10 @@ export interface AppMarketPlaceDefinition { * Unique identifier of this application. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name of the Application. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/workflow.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/workflow.ts index 18528ea0fd6..264a55a2f94 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/workflow.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/automations/workflow.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A unit of work that will be triggered as an API call to the OpenMetadata server. */ export interface Workflow { @@ -53,6 +51,10 @@ export interface Workflow { * Unique identifier of this workflow instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name of the workflow. */ @@ -297,7 +299,7 @@ export interface OpenMetadataConnection { /** * SSL Configuration for OpenMetadata Server */ - sslConfig?: SchemaRegistrySSLClass; + sslConfig?: ConsumerConfigSSLClass; /** * If set to true, when creating a service during the ingestion we will store its Service * Connection. Otherwise, the ingestion will create a bare service without connection @@ -403,12 +405,15 @@ export interface OpenMetadataJWTClientConfig { * * SSL Configuration details. * + * Consumer Config SSL Config. Configuration for enabling SSL for the Consumer Config + * connection. + * * Schema Registry SSL Config. Configuration for enabling SSL for the Schema Registry * connection. * * OpenMetadata Client configured to validate SSL certificates. */ -export interface SchemaRegistrySSLClass { +export interface ConsumerConfigSSLClass { /** * The CA certificate used for SSL validation. */ @@ -875,10 +880,11 @@ export interface ConfigClass { * * Http/Https connection scheme */ - scheme?: string; - supportsDatabase?: boolean; - supportsDataDiff?: boolean; - supportsDBTExtraction?: boolean; + scheme?: string; + supportsDatabase?: boolean; + supportsDataDiff?: boolean; + supportsDBTExtraction?: boolean; + supportsIncrementalMetadataExtraction?: boolean; /** * Supports Lineage Extraction. */ @@ -1308,6 +1314,10 @@ export interface ConfigClass { * usage monitoring. */ account?: string; + /** + * Full name of the schema where the account usage data is stored. + */ + accountUsageSchema?: string; /** * Optional configuration for ingestion to keep the client session active in case the * ingestion process runs for longer durations. @@ -1639,6 +1649,11 @@ export interface ConfigClass { * Confluent Redpanda Consumer Config */ consumerConfig?: { [key: string]: any }; + /** + * Consumer Config SSL Config. Configuration for enabling SSL for the Consumer Config + * connection. + */ + consumerConfigSSL?: ConsumerConfigSSLClass; /** * sasl.mechanism Consumer Config property */ @@ -1662,7 +1677,7 @@ export interface ConfigClass { * Schema Registry SSL Config. Configuration for enabling SSL for the Schema Registry * connection. */ - schemaRegistrySSL?: SchemaRegistrySSLClass; + schemaRegistrySSL?: ConsumerConfigSSLClass; /** * Schema Registry Topic Suffix Name. The suffix to be appended to the topic name to get * topic schema from registry. @@ -2459,7 +2474,7 @@ export interface SSLCertificatesByPath { * Qlik Authentication Certificate File Path */ export interface QlikCertificatesBy { - sslConfig?: SchemaRegistrySSLClass; + sslConfig?: ConsumerConfigSSLClass; /** * Client Certificate */ @@ -3049,6 +3064,9 @@ export enum ConnectionScheme { * * SSL Configuration details. * + * Consumer Config SSL Config. Configuration for enabling SSL for the Consumer Config + * connection. + * * Schema Registry SSL Config. Configuration for enabling SSL for the Schema Registry * connection. */ @@ -3265,7 +3283,7 @@ export interface HiveMetastoreConnectionDetails { /** * SSL Configuration details. */ - sslConfig?: SchemaRegistrySSLClass; + sslConfig?: ConsumerConfigSSLClass; sslMode?: SSLMode; supportsDatabase?: boolean; supportsDataDiff?: boolean; @@ -3502,6 +3520,9 @@ export enum KafkaSecurityProtocol { * * SSL Configuration details. * + * Consumer Config SSL Config. Configuration for enabling SSL for the Consumer Config + * connection. + * * Schema Registry SSL Config. Configuration for enabling SSL for the Schema Registry * connection. * diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/bot.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/bot.ts index aeaf150ba82..5cf7e8f8252 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/bot.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/bot.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines a Bot entity. A bot automates tasks, such as adding description, * identifying the importance of data. It performs this task as a special user in the system. */ @@ -55,6 +53,10 @@ export interface Bot { * Unique identifier of a bot instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name of the bot. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/classification/classification.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/classification/classification.ts index 67874faf137..9188a0d9e91 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/classification/classification.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/classification/classification.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `Classification` entity contains hierarchical terms called tags used for categorizing * and classifying data assets and other entities. */ @@ -54,6 +52,10 @@ export interface Classification { * Unique identifier of this entity instance. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Tags under this classification are mutually exclusive. When mutually exclusive is `true` * the tags from this classification are used to **classify** an entity. An entity can only diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/classification/tag.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/classification/tag.ts index c0e1a7d45be..69e139f2677 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/classification/tag.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/classification/tag.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `Tag` entity is used for classification or categorization. It is a term defined under * `Classification` entity. Tags are used to label the entities and entity fields, such as * Tables, and Columns. @@ -71,6 +69,10 @@ export interface Tag { * Unique identifier of this entity instance. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Children tags under this group are mutually exclusive. When mutually exclusive is `true` * the tags from this group are used to **classify** an entity. An entity can only be in one diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/apiCollection.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/apiCollection.ts index c549fe2a466..b9c34c2a91d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/apiCollection.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/apiCollection.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the APICollection entity. API Collection allows user to group * multiple APIs together. In OpenAPI specification its marked as a Tag. */ @@ -69,6 +67,10 @@ export interface APICollection { * Unique identifier that identifies a API Collection instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/apiEndpoint.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/apiEndpoint.ts index f0c68ea2bf6..1a9ee8e5fe1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/apiEndpoint.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/apiEndpoint.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the APIEndpoint entity. An APIEndpoint is a specific endpoint of an * API that is part of an API Collection. */ @@ -72,6 +70,10 @@ export interface APIEndpoint { * Unique identifier that identifies a API Endpoint instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/chart.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/chart.ts index 15df32d2f0d..645f193c221 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/chart.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/chart.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `Chart` presents data visually. Charts can be part of `Dashboards`. */ export interface Chart { @@ -64,6 +62,10 @@ export interface Chart { * Unique identifier that identifies a chart instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/container.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/container.ts index ec15f54d2e5..cd69049aa13 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/container.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/container.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Container entity. A Container is an abstraction for any * path(including the top level eg. bucket in S3) storing data in an Object store such as * S3, GCP, Azure. It maps a tree-like structure, where each Container can have a parent and @@ -83,6 +81,10 @@ export interface Container { * Unique identifier that identifies this container instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboard.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboard.ts index 7a25f7605d6..a1b1cd488c2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboard.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboard.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Dashboard entity. Dashboards are computed from data and visually * present data, metrics, and KPIs. They are typically updated in real-time and allow * interactive data exploration. @@ -74,6 +72,10 @@ export interface Dashboard { * Unique identifier that identifies a dashboard instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboardDataModel.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboardDataModel.ts index 0c5c8e6a159..10f67e3504e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboardDataModel.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/dashboardDataModel.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * Dashboard Data Model entity definition. Data models are the schemas used to build * dashboards, charts, or other data assets. */ @@ -69,6 +67,10 @@ export interface DashboardDataModel { * Unique identifier of this data model instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/database.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/database.ts index 5dc38de7d52..a424c66dc50 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/database.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/database.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -71,6 +71,10 @@ export interface Database { * Unique identifier that identifies this database instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/databaseSchema.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/databaseSchema.ts index dc5627b1c8e..5bf822333cb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/databaseSchema.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/databaseSchema.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Database Schema entity. A `Database Schema` is collection of * tables, views, stored procedures, and other database objects. */ @@ -68,6 +66,10 @@ export interface DatabaseSchema { * Unique identifier that identifies this schema instance. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/glossary.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/glossary.ts index 1fcce8e6d32..c1e3c7fa8f7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/glossary.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/glossary.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Glossary entity. A Glossary is collection of hierarchical * GlossaryTerms. */ @@ -61,6 +59,10 @@ export interface Glossary { * Unique identifier of a glossary instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Glossary terms that are direct children in this glossary are mutually exclusive. When * mutually exclusive is `true` only one term can be used to label an entity. When mutually diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/glossaryTerm.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/glossaryTerm.ts index e61fa0e6491..f11947616d4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/glossaryTerm.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/glossaryTerm.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines te Glossary term entities. */ export interface GlossaryTerm { @@ -74,6 +72,10 @@ export interface GlossaryTerm { * Unique identifier of a glossary term instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Glossary terms that are children of this term are mutually exclusive. When mutually * exclusive is `true` only one term can be used to label an entity from this group. When diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/metric.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/metric.ts index 1860e89f459..8c045f76f2d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/metric.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/metric.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Metrics entity. `Metrics` are measurements computed from data * such as `Monthly Active Users`. Some of the metrics that measures used to determine * performance against an objective are called KPIs or Key Performance Indicators, such as @@ -68,6 +66,10 @@ export interface Metric { * Unique identifier that identifies this Metric instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Expression used to compute the metric. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/mlmodel.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/mlmodel.ts index 371adecc75a..ab5ccb9e5e9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/mlmodel.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/mlmodel.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Model entity. `Machine Learning Models` are algorithms trained on * data to find patterns or make predictions. */ @@ -71,6 +69,10 @@ export interface Mlmodel { * Unique identifier of an ML Model instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/pipeline.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/pipeline.ts index 63ddd16edc6..1abba11642c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/pipeline.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/pipeline.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Pipeline entity. A pipeline enables the flow of data from source * to destination through a series of processing steps. ETL is a type of pipeline where the * series of steps Extract, Transform and Load the data. @@ -69,6 +67,10 @@ export interface Pipeline { * Unique identifier that identifies a pipeline instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/query.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/query.ts index a2e8ada5ca3..46b4a926f20 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/query.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/query.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the type to capture any data asset's queries. */ export interface Query { @@ -61,6 +59,10 @@ export interface Query { * Unique identifier of the query. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name of an entity to which the query belongs to */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/report.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/report.ts index c5ecb223d4b..45105a0a8e0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/report.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/report.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Report entity. `Reports` are static information computed from * data periodically that includes data in text, table, and visual form. */ @@ -51,6 +49,10 @@ export interface Report { * Unique identifier that identifies this report. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this report instance uniquely. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/searchIndex.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/searchIndex.ts index 3bb6fea8cd0..8394474a9e5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/searchIndex.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/searchIndex.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -66,6 +66,10 @@ export interface SearchIndex { * Unique identifier that identifies this SearchIndex instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Whether the entity is index or index template. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/storedProcedure.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/storedProcedure.ts index 93542385d5a..10d5ebfe706 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/storedProcedure.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/storedProcedure.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `StoredProcedure` entity that contains the set of code statements with an assigned * name and is defined in a `Database Schema`." */ @@ -75,6 +73,10 @@ export interface StoredProcedure { * Unique identifier of the StoredProcedure. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts index bc444dcc9e6..e961899b27e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts @@ -86,6 +86,10 @@ export interface Table { * Unique identifier of this table instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Details of other tables this table is frequently joined with. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/topic.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/topic.ts index 7bc44d8dfbd..5f34f92db9a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/topic.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/data/topic.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `Topic` is a feed or an event stream in a `Messaging Service` into which publishers * publish messages and consumed by consumers. */ @@ -68,6 +66,10 @@ export interface Topic { * Unique identifier that identifies this topic instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Life Cycle properties of the entity */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/docStore/document.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/docStore/document.ts index 8e047c4bca8..fc2d262cb40 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/docStore/document.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/docStore/document.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines Document. A Generic entity to capture any kind of Json Payload. */ export interface Document { @@ -44,6 +42,10 @@ export interface Document { */ href?: string; id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name of the DocStore */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/domains/dataProduct.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/domains/dataProduct.ts index 9b9fff248ae..217a36249d8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/domains/dataProduct.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/domains/dataProduct.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `Data Product` or `Data as a Product` is a logical unit that contains all components to * process and store data for analytical or data-intensive use cases made available to data * consumers. @@ -58,6 +56,10 @@ export interface DataProduct { * Unique ID of the Data Product */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * A unique name of the Data Product */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/domains/domain.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/domains/domain.ts index 10e907f8361..bd12fd5d034 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/domains/domain.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/domains/domain.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `Domain` is a bounded context that is aligned with a Business Unit or a function within * an organization. */ @@ -57,6 +55,10 @@ export interface Domain { * Unique ID of the Domain */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * A unique name of the Domain */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/policies/policy.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/policies/policy.ts index 5f3cc846a8b..29d728ab861 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/policies/policy.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/policies/policy.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `Policy` defines control that needs to be applied across different Data Entities. */ export interface Policy { @@ -65,6 +63,10 @@ export interface Policy { * Unique identifier that identifies this Policy. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Location to which a policy is applied. This field is relevant only for `lifeCycle` * policies. @@ -110,6 +112,8 @@ export interface Policy { * Change that led to this version of the Policy. * * Description of the change. + * + * Change that lead to this version of the entity. */ export interface ChangeDescription { /** diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/apiService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/apiService.ts index 48d680ff72d..f542ecae232 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/apiService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/apiService.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the API Service entity, to capture metadata from any REST API * Services. */ @@ -54,6 +52,10 @@ export interface APIService { * Unique identifier of this API service instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this API service. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/testConnectionDefinition.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/testConnectionDefinition.ts index 087b3c17edc..629048dc8c6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/testConnectionDefinition.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/testConnectionDefinition.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * TestConnection is the definition that will encapsulate the steps required to test a * connection to a specific service. */ @@ -50,6 +48,10 @@ export interface TestConnectionDefinition { * Unique identifier of this test case definition instance. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name of the Test Connection Definition. It should be the `type` of the service being * tested, e.g., Mysql, or Snowflake. diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/dashboardService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/dashboardService.ts index 8491652a7fb..c68af33f791 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/dashboardService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/dashboardService.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Dashboard Service entity, such as Looker and Superset. */ export interface DashboardService { @@ -53,6 +51,10 @@ export interface DashboardService { * Unique identifier of this dashboard service instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this dashboard service. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/databaseService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/databaseService.ts index 653bf3d9fd2..abd9ec44144 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/databaseService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/databaseService.ts @@ -53,6 +53,10 @@ export interface DatabaseService { * Unique identifier of this database service instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this database service. */ @@ -307,10 +311,11 @@ export interface ConfigClass { * * Couchbase driver scheme options. */ - scheme?: ConfigScheme; - supportsDatabase?: boolean; - supportsDataDiff?: boolean; - supportsDBTExtraction?: boolean; + scheme?: ConfigScheme; + supportsDatabase?: boolean; + supportsDataDiff?: boolean; + supportsDBTExtraction?: boolean; + supportsIncrementalMetadataExtraction?: boolean; /** * Supports Lineage Extraction. */ @@ -710,6 +715,10 @@ export interface ConfigClass { * usage monitoring. */ account?: string; + /** + * Full name of the schema where the account usage data is stored. + */ + accountUsageSchema?: string; /** * Optional configuration for ingestion to keep the client session active in case the * ingestion process runs for longer durations. diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/ingestionPipeline.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/ingestionPipeline.ts index 81d4ae267dd..2e0221961b6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/ingestionPipeline.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/ingestionPipeline.ts @@ -61,6 +61,10 @@ export interface IngestionPipeline { * Unique identifier that identifies this pipeline. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * The ingestion agent responsible for executing the ingestion pipeline. */ @@ -171,6 +175,8 @@ export interface AirflowConfig { * Change that led to this version of the entity. * * Description of the change. + * + * Change that lead to this version of the entity. */ export interface ChangeDescription { /** @@ -3064,6 +3070,10 @@ export interface ConfigClass { * usage monitoring. */ account?: string; + /** + * Full name of the schema where the account usage data is stored. + */ + accountUsageSchema?: string; /** * Optional configuration for ingestion to keep the client session active in case the * ingestion process runs for longer durations. diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/messagingService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/messagingService.ts index ba7ca838711..d6ad3c584ea 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/messagingService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/messagingService.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Messaging Service entity, such as Kafka and Pulsar. */ export interface MessagingService { @@ -54,6 +52,10 @@ export interface MessagingService { * Unique identifier of this messaging service instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this messaging service. */ @@ -171,6 +173,11 @@ export interface Connection { * Confluent Redpanda Consumer Config */ consumerConfig?: { [key: string]: any }; + /** + * Consumer Config SSL Config. Configuration for enabling SSL for the Consumer Config + * connection. + */ + consumerConfigSSL?: Config; /** * sasl.mechanism Consumer Config property */ @@ -272,24 +279,14 @@ export interface AWSCredentials { } /** - * sasl.mechanism Consumer Config property - * - * SASL Mechanism consumer config property - */ -export enum SaslMechanismType { - Gssapi = "GSSAPI", - Oauthbearer = "OAUTHBEARER", - Plain = "PLAIN", - ScramSHA256 = "SCRAM-SHA-256", - ScramSHA512 = "SCRAM-SHA-512", -} - -/** - * Schema Registry SSL Config. Configuration for enabling SSL for the Schema Registry + * Consumer Config SSL Config. Configuration for enabling SSL for the Consumer Config * connection. * * Client SSL configuration * + * Schema Registry SSL Config. Configuration for enabling SSL for the Schema Registry + * connection. + * * OpenMetadata Client configured to validate SSL certificates. */ export interface Config { @@ -307,6 +304,19 @@ export interface Config { sslKey?: string; } +/** + * sasl.mechanism Consumer Config property + * + * SASL Mechanism consumer config property + */ +export enum SaslMechanismType { + Gssapi = "GSSAPI", + Oauthbearer = "OAUTHBEARER", + Plain = "PLAIN", + ScramSHA256 = "SCRAM-SHA-256", + ScramSHA512 = "SCRAM-SHA-512", +} + /** * security.protocol consumer config property */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/metadataService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/metadataService.ts index 4711e342302..82b5237b1cf 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/metadataService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/metadataService.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Metadata Service entity, such as Amundsen, Atlas etc. */ export interface MetadataService { @@ -50,6 +48,10 @@ export interface MetadataService { * Unique identifier of this database service instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this database service. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/mlmodelService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/mlmodelService.ts index de881d12c5f..3c6f420e5c4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/mlmodelService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/mlmodelService.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * MlModel Service Entity, such as MlFlow. */ export interface MlmodelService { @@ -54,6 +52,10 @@ export interface MlmodelService { * Unique identifier of this pipeline service instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this pipeline service. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/pipelineService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/pipelineService.ts index 79ceccb0051..16e6ecf8105 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/pipelineService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/pipelineService.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Pipeline Service entity, such as Airflow and Prefect. */ export interface PipelineService { @@ -54,6 +52,10 @@ export interface PipelineService { * Unique identifier of this pipeline service instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this pipeline service. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/searchService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/searchService.ts index 2ba5662a5bc..386982b12b7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/searchService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/searchService.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Search Service entity, such as ElasticSearch, OpenSearch. */ export interface SearchService { @@ -53,6 +51,10 @@ export interface SearchService { * Unique identifier of this search service instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this search service. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/storageService.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/storageService.ts index 68d54681432..1c3ca144266 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/storageService.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/services/storageService.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Storage Service entity, such as S3, GCS or AZURE. */ export interface StorageService { @@ -53,6 +51,10 @@ export interface StorageService { * Unique identifier of this storage service instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this storage service. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/persona.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/persona.ts index fe0f86c6e40..a796a28703a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/persona.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/persona.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -41,6 +41,10 @@ export interface Persona { */ href?: string; id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * A unique name of Persona. Example 'data engineer' */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/role.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/role.ts index 9d93095cff0..30ac01a5542 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/role.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/role.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `Role` is a collection of `Policies` that provides access control. A user or a team can * be assigned one or multiple roles that provide privileges to a user and members of a team * to perform the job function. @@ -60,7 +58,11 @@ export interface Role { */ href?: string; id: string; - name: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; + name: string; /** * Policies that is attached to this role. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/team.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/team.ts index edfb6d94dac..e37b3b7ee18 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/team.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/team.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the Team entity. A `Team` is a group of zero or more users and/or * other teams. Teams can own zero or more data assets. Hierarchical teams are supported * `Organization` -> `BusinessUnit` -> `Division` -> `Department`. @@ -67,6 +65,10 @@ export interface Team { */ href?: string; id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Roles that a team is inheriting through membership in teams that have set team default * roles. diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/user.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/user.ts index 9a178c94ba4..d70d5836556 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/user.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/teams/user.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * A `User` represents a user of OpenMetadata. A user can be part of 0 or more teams. A * special type of user called Bot is used for automation. A user can be an owner of zero or * more data assets. A user can also follow zero or more data assets. @@ -63,6 +61,10 @@ export interface User { * Unique identifier that identifies a user entity instance. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Roles that a user is inheriting through membership in teams that have set team default * roles. diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/entity/type.ts b/openmetadata-ui/src/main/resources/ui/src/generated/entity/type.ts index 5bc9fd78af9..e8eb454c24d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/entity/type.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/entity/type.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines a type as an entity. Types includes property types and entity types. * Custom types can also be defined by the users to extend the metadata system. */ @@ -55,6 +53,10 @@ export interface Type { * Unique identifier of the type instance. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Unique name that identifies the type. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/events/eventSubscription.ts b/openmetadata-ui/src/main/resources/ui/src/generated/events/eventSubscription.ts index f48c91d2963..3b4ea7a394f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/events/eventSubscription.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/events/eventSubscription.ts @@ -70,6 +70,10 @@ export interface EventSubscription { * Unique identifier that identifies this Event Subscription. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Input for the Filters. */ @@ -127,6 +131,8 @@ export enum AlertType { * Change that led to this version of the Event Subscription. * * Description of the change. + * + * Change that lead to this version of the entity. */ export interface ChangeDescription { /** diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/governance/workflows/workflowDefinition.ts b/openmetadata-ui/src/main/resources/ui/src/generated/governance/workflows/workflowDefinition.ts index 040f395f81a..f43fa01c667 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/governance/workflows/workflowDefinition.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/governance/workflows/workflowDefinition.ts @@ -50,6 +50,10 @@ export interface WorkflowDefinition { * Unique identifier of this workflow definition. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this workflow definition. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/tests/testCase.ts b/openmetadata-ui/src/main/resources/ui/src/generated/tests/testCase.ts index 0ae6db7ef4d..b9e2d4ad38a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/tests/testCase.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/tests/testCase.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * Test case is a test definition to capture data quality tests against tables, columns, and * other data assets. */ @@ -67,6 +65,10 @@ export interface TestCase { * Reference to an ongoing Incident ID (stateId) for this test case. */ incidentId?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * SQL query to retrieve the failed rows for this test case. */ @@ -521,6 +523,10 @@ export interface TestSuite { * Unique identifier of this test suite instance. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Indicates if the test suite is inherited from a parent entity. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts b/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts index 19cefeedc6f..5f1b1af95c8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * Test Definition is a type of test using which test cases are created to capture data * quality tests against data entities. */ @@ -52,6 +50,10 @@ export interface TestDefinition { * Unique identifier of this test case definition instance. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Name that identifies this test case. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/tests/testSuite.ts b/openmetadata-ui/src/main/resources/ui/src/generated/tests/testSuite.ts index 9cb2a6ca828..ebf0c9aebf7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/tests/testSuite.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/tests/testSuite.ts @@ -70,6 +70,10 @@ export interface TestSuite { * Unique identifier of this test suite instance. */ id?: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Indicates if the test suite is inherited from a parent entity. */ diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/type/changeEvent.ts b/openmetadata-ui/src/main/resources/ui/src/generated/type/changeEvent.ts index 2a1caa52d81..92803b41bd4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/type/changeEvent.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/type/changeEvent.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the change event type to capture the changes to entities. Entities * change due to user activity, such as updating description of a dataset, changing * ownership, or adding new tags. Entity also changes due to activities at the metadata @@ -59,6 +57,10 @@ export interface ChangeEvent { * Unique identifier for the event. */ id: string; + /** + * Change that lead to this version of the entity. + */ + incrementalChangeDescription?: ChangeDescription; /** * Version of the entity before this change. Note that not all changes result in entity * version change. When entity version is not changed, `previousVersion` is same as @@ -81,6 +83,8 @@ export interface ChangeEvent { * null. * * Description of the change. + * + * Change that lead to this version of the entity. */ export interface ChangeDescription { /** diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/type/entityHistory.ts b/openmetadata-ui/src/main/resources/ui/src/generated/type/entityHistory.ts index 340950215fe..e8fa01e158f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/type/entityHistory.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/type/entityHistory.ts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Collate. + * Copyright 2025 Collate. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,9 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - - /** +/** * This schema defines the type used for capturing version of history of entity. */ export interface EntityHistory {