mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-04 15:18:17 +00:00
This commit is contained in:
parent
4ad0d9f76c
commit
a1941301af
@ -107,7 +107,19 @@ public final class Entity {
|
|||||||
//
|
//
|
||||||
// List of entities whose changes should not be published to the Activity Feed
|
// List of entities whose changes should not be published to the Activity Feed
|
||||||
//
|
//
|
||||||
public static final List<String> ACTIVITY_FEED_EXCLUDED_ENTITIES = List.of(USER, TEAM, ROLE, POLICY, BOTS);
|
public static final List<String> ACTIVITY_FEED_EXCLUDED_ENTITIES =
|
||||||
|
List.of(
|
||||||
|
USER,
|
||||||
|
TEAM,
|
||||||
|
ROLE,
|
||||||
|
POLICY,
|
||||||
|
BOTS,
|
||||||
|
AIRFLOW_PIPELINE,
|
||||||
|
DATABASE_SERVICE,
|
||||||
|
PIPELINE_SERVICE,
|
||||||
|
DASHBOARD_SERVICE,
|
||||||
|
STORAGE_SERVICE,
|
||||||
|
MESSAGING_SERVICE);
|
||||||
|
|
||||||
private Entity() {}
|
private Entity() {}
|
||||||
|
|
||||||
|
@ -257,15 +257,5 @@ public class AirflowPipelineRepository extends EntityRepository<AirflowPipeline>
|
|||||||
public AirflowPipelineUpdater(AirflowPipeline original, AirflowPipeline updated, Operation operation) {
|
public AirflowPipelineUpdater(AirflowPipeline original, AirflowPipeline updated, Operation operation) {
|
||||||
super(original, updated, operation);
|
super(original, updated, operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void entitySpecificUpdate() throws IOException {
|
|
||||||
AirflowPipeline origIngestion = original.getEntity();
|
|
||||||
AirflowPipeline updatedIngestion = updated.getEntity();
|
|
||||||
recordChange("scheduleInterval", origIngestion.getScheduleInterval(), updatedIngestion.getScheduleInterval());
|
|
||||||
recordChange("pipelineConfig", origIngestion.getPipelineConfig(), updatedIngestion.getPipelineConfig());
|
|
||||||
recordChange("startDate", origIngestion.getStartDate(), updatedIngestion.getStartDate());
|
|
||||||
recordChange("endDate", origIngestion.getEndDate(), updatedIngestion.getEndDate());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ package org.openmetadata.catalog.jdbi3;
|
|||||||
|
|
||||||
import static org.openmetadata.catalog.Entity.FIELD_OWNER;
|
import static org.openmetadata.catalog.Entity.FIELD_OWNER;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
@ -25,7 +24,6 @@ import org.openmetadata.catalog.entity.services.DashboardService;
|
|||||||
import org.openmetadata.catalog.resources.services.dashboard.DashboardServiceResource;
|
import org.openmetadata.catalog.resources.services.dashboard.DashboardServiceResource;
|
||||||
import org.openmetadata.catalog.type.ChangeDescription;
|
import org.openmetadata.catalog.type.ChangeDescription;
|
||||||
import org.openmetadata.catalog.type.EntityReference;
|
import org.openmetadata.catalog.type.EntityReference;
|
||||||
import org.openmetadata.catalog.type.Schedule;
|
|
||||||
import org.openmetadata.catalog.util.EntityInterface;
|
import org.openmetadata.catalog.util.EntityInterface;
|
||||||
import org.openmetadata.catalog.util.EntityUtil;
|
import org.openmetadata.catalog.util.EntityUtil;
|
||||||
import org.openmetadata.catalog.util.EntityUtil.Fields;
|
import org.openmetadata.catalog.util.EntityUtil.Fields;
|
||||||
@ -224,24 +222,5 @@ public class DashboardServiceRepository extends EntityRepository<DashboardServic
|
|||||||
public DashboardServiceUpdater(DashboardService original, DashboardService updated, Operation operation) {
|
public DashboardServiceUpdater(DashboardService original, DashboardService updated, Operation operation) {
|
||||||
super(original, updated, operation);
|
super(original, updated, operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void entitySpecificUpdate() throws IOException {
|
|
||||||
updateDashboardUrl();
|
|
||||||
updateIngestionSchedule();
|
|
||||||
recordChange("userName", original.getEntity().getUsername(), updated.getEntity().getUsername());
|
|
||||||
// TODO change recorded for password
|
|
||||||
// recordChange("password", original.getEntity().getPassword(), updated.getEntity().getPassword());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateDashboardUrl() throws JsonProcessingException {
|
|
||||||
recordChange("dashboardUrl", original.getEntity().getDashboardUrl(), updated.getEntity().getDashboardUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateIngestionSchedule() throws JsonProcessingException {
|
|
||||||
Schedule origSchedule = original.getEntity().getIngestionSchedule();
|
|
||||||
Schedule updatedSchedule = updated.getEntity().getIngestionSchedule();
|
|
||||||
recordChange("ingestionSchedule", origSchedule, updatedSchedule, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,12 +15,9 @@ package org.openmetadata.catalog.jdbi3;
|
|||||||
|
|
||||||
import static org.openmetadata.catalog.Entity.FIELD_OWNER;
|
import static org.openmetadata.catalog.Entity.FIELD_OWNER;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.openmetadata.catalog.Entity;
|
import org.openmetadata.catalog.Entity;
|
||||||
import org.openmetadata.catalog.entity.services.MessagingService;
|
import org.openmetadata.catalog.entity.services.MessagingService;
|
||||||
@ -225,24 +222,5 @@ public class MessagingServiceRepository extends EntityRepository<MessagingServic
|
|||||||
public MessagingServiceUpdater(MessagingService original, MessagingService updated, Operation operation) {
|
public MessagingServiceUpdater(MessagingService original, MessagingService updated, Operation operation) {
|
||||||
super(original, updated, operation);
|
super(original, updated, operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void entitySpecificUpdate() throws IOException {
|
|
||||||
MessagingService origService = original.getEntity();
|
|
||||||
MessagingService updatedService = updated.getEntity();
|
|
||||||
recordChange("schemaRegistry", origService.getSchemaRegistry(), updatedService.getSchemaRegistry());
|
|
||||||
recordChange(
|
|
||||||
"ingestionSchedule", origService.getIngestionSchedule(), updatedService.getIngestionSchedule(), true);
|
|
||||||
updateBrokers();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateBrokers() throws JsonProcessingException {
|
|
||||||
List<String> origBrokers = original.getEntity().getBrokers();
|
|
||||||
List<String> updatedBrokers = updated.getEntity().getBrokers();
|
|
||||||
|
|
||||||
List<String> addedBrokers = new ArrayList<>();
|
|
||||||
List<String> deletedBrokers = new ArrayList<>();
|
|
||||||
recordListChange("brokers", origBrokers, updatedBrokers, addedBrokers, deletedBrokers, EntityUtil.stringMatch);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,15 +222,5 @@ public class PipelineServiceRepository extends EntityRepository<PipelineService>
|
|||||||
public PipelineServiceUpdater(PipelineService original, PipelineService updated, Operation operation) {
|
public PipelineServiceUpdater(PipelineService original, PipelineService updated, Operation operation) {
|
||||||
super(original, updated, operation);
|
super(original, updated, operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void entitySpecificUpdate() throws IOException {
|
|
||||||
recordChange("pipelineUrl", original.getEntity().getPipelineUrl(), updated.getEntity().getPipelineUrl());
|
|
||||||
recordChange(
|
|
||||||
"ingestionSchedule",
|
|
||||||
original.getEntity().getIngestionSchedule(),
|
|
||||||
updated.getEntity().getIngestionSchedule(),
|
|
||||||
true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user