mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-08 21:46:47 +00:00
parent
1986423f9d
commit
55c91b2a27
@ -207,10 +207,9 @@ public class AirflowRESTClient {
|
||||
if (response.statusCode() == 200) {
|
||||
return response;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
throw AirflowException.byMessage("Failed to test connection.", e.getMessage());
|
||||
}
|
||||
throw AirflowException.byMessage("Failed to test connection.", response.toString());
|
||||
throw new AirflowException(String.format("Failed to test connection due to %s", response.body()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ public class ElasticSearchEventPublisher extends AbstractEventPublisher {
|
||||
LOG.error("Error in publishing to ElasticSearch");
|
||||
throw new ElasticSearchRetriableException(e.getMessage());
|
||||
} else {
|
||||
throw new EventPublisherException(e.getMessage());
|
||||
LOG.error(e.getMessage(), e);
|
||||
}
|
||||
} catch (IOException ie) {
|
||||
throw new EventPublisherException(ie.getMessage());
|
||||
|
||||
@ -19,6 +19,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.UUID;
|
||||
import org.json.JSONObject;
|
||||
import org.openmetadata.catalog.Entity;
|
||||
import org.openmetadata.catalog.entity.services.ingestionPipelines.AirflowConfig;
|
||||
import org.openmetadata.catalog.entity.services.ingestionPipelines.IngestionPipeline;
|
||||
@ -31,6 +32,7 @@ import org.openmetadata.catalog.type.Relationship;
|
||||
import org.openmetadata.catalog.util.EntityInterface;
|
||||
import org.openmetadata.catalog.util.EntityUtil.Fields;
|
||||
import org.openmetadata.catalog.util.FullyQualifiedName;
|
||||
import org.openmetadata.catalog.util.JsonUtils;
|
||||
|
||||
public class IngestionPipelineRepository extends EntityRepository<IngestionPipeline> {
|
||||
private static final String INGESTION_PIPELINE_UPDATE_FIELDS = "owner,source,airflowConfig";
|
||||
@ -253,9 +255,15 @@ public class IngestionPipelineRepository extends EntityRepository<IngestionPipel
|
||||
}
|
||||
|
||||
private void updateSource(Source origSource, Source updatedSource) throws JsonProcessingException {
|
||||
if (origSource.getServiceConnection() != updatedSource.getServiceConnection()
|
||||
&& !origSource.getServiceName().equals(updatedSource.getServiceName())
|
||||
&& origSource.getSourceConfig() != updatedSource.getSourceConfig()) {
|
||||
JSONObject origSourceConfig = new JSONObject(JsonUtils.pojoToJson(origSource.getSourceConfig().getConfig()));
|
||||
JSONObject updatedSourceConfig =
|
||||
new JSONObject(JsonUtils.pojoToJson(updatedSource.getSourceConfig().getConfig()));
|
||||
JSONObject origSourceConnection = new JSONObject(JsonUtils.pojoToJson(origSource.getServiceConnection()));
|
||||
JSONObject updatedSourceConnection = new JSONObject(JsonUtils.pojoToJson(updatedSource.getServiceConnection()));
|
||||
|
||||
if (!origSource.getServiceName().equals(updatedSource.getServiceName())
|
||||
|| !origSourceConfig.similar(updatedSourceConfig)
|
||||
|| !origSourceConnection.similar(updatedSourceConnection)) {
|
||||
recordChange("source", origSource, updatedSource);
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,6 +89,7 @@ public class IngestionPipelineResourceTest extends EntityResourceTest<IngestionP
|
||||
IngestionPipelineResource.IngestionPipelineList.class,
|
||||
"services/ingestionPipelines",
|
||||
IngestionPipelineResource.FIELDS);
|
||||
this.supportsEmptyDescription = false;
|
||||
}
|
||||
|
||||
@BeforeAll
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user