mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-10 15:59:57 +00:00
fix: implement noop decryptConfig for external app pipeline generation (#23407)
This commit is contained in:
parent
e933089158
commit
f54e902bfe
@ -182,22 +182,28 @@ public class AbstractNativeApplication implements NativeApplication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected Map<String, Object> decryptConfiguration(Map<String, Object> appConfig) {
|
||||||
|
return appConfig;
|
||||||
|
}
|
||||||
|
|
||||||
private void updateAppConfig(
|
private void updateAppConfig(
|
||||||
IngestionPipelineRepository repository,
|
IngestionPipelineRepository repository,
|
||||||
Map<String, Object> appConfiguration,
|
Map<String, Object> appConfiguration,
|
||||||
String updatedBy) {
|
String updatedBy) {
|
||||||
|
Map<String, Object> decryptedConfig = decryptConfiguration(appConfiguration);
|
||||||
String fqn = FullyQualifiedName.add(SERVICE_NAME, this.getApp().getName());
|
String fqn = FullyQualifiedName.add(SERVICE_NAME, this.getApp().getName());
|
||||||
IngestionPipeline updated = repository.findByName(fqn, Include.NON_DELETED);
|
IngestionPipeline updated = repository.findByName(fqn, Include.NON_DELETED);
|
||||||
ApplicationPipeline appPipeline =
|
ApplicationPipeline appPipeline =
|
||||||
JsonUtils.convertValue(updated.getSourceConfig().getConfig(), ApplicationPipeline.class);
|
JsonUtils.convertValue(updated.getSourceConfig().getConfig(), ApplicationPipeline.class);
|
||||||
IngestionPipeline original = JsonUtils.deepCopy(updated, IngestionPipeline.class);
|
IngestionPipeline original = JsonUtils.deepCopy(updated, IngestionPipeline.class);
|
||||||
updated.setSourceConfig(
|
updated.setSourceConfig(
|
||||||
updated.getSourceConfig().withConfig(appPipeline.withAppConfig(appConfiguration)));
|
updated.getSourceConfig().withConfig(appPipeline.withAppConfig(decryptedConfig)));
|
||||||
repository.update(null, original, updated, updatedBy);
|
repository.update(null, original, updated, updatedBy);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createAndBindIngestionPipeline(
|
private void createAndBindIngestionPipeline(
|
||||||
IngestionPipelineRepository ingestionPipelineRepository, Map<String, Object> config) {
|
IngestionPipelineRepository ingestionPipelineRepository, Map<String, Object> config) {
|
||||||
|
Map<String, Object> decryptedConfig = decryptConfiguration(config);
|
||||||
MetadataServiceRepository serviceEntityRepository =
|
MetadataServiceRepository serviceEntityRepository =
|
||||||
(MetadataServiceRepository) Entity.getEntityRepository(Entity.METADATA_SERVICE);
|
(MetadataServiceRepository) Entity.getEntityRepository(Entity.METADATA_SERVICE);
|
||||||
EntityReference service =
|
EntityReference service =
|
||||||
@ -216,7 +222,7 @@ public class AbstractNativeApplication implements NativeApplication {
|
|||||||
.withConfig(
|
.withConfig(
|
||||||
new ApplicationPipeline()
|
new ApplicationPipeline()
|
||||||
.withSourcePythonClass(this.getApp().getSourcePythonClass())
|
.withSourcePythonClass(this.getApp().getSourcePythonClass())
|
||||||
.withAppConfig(config)
|
.withAppConfig(decryptedConfig)
|
||||||
.withAppPrivateConfig(this.getApp().getPrivateConfiguration())))
|
.withAppPrivateConfig(this.getApp().getPrivateConfiguration())))
|
||||||
.withAirflowConfig(
|
.withAirflowConfig(
|
||||||
new AirflowConfig()
|
new AirflowConfig()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user