mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-03 12:08:31 +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(
|
||||
IngestionPipelineRepository repository,
|
||||
Map<String, Object> appConfiguration,
|
||||
String updatedBy) {
|
||||
Map<String, Object> decryptedConfig = decryptConfiguration(appConfiguration);
|
||||
String fqn = FullyQualifiedName.add(SERVICE_NAME, this.getApp().getName());
|
||||
IngestionPipeline updated = repository.findByName(fqn, Include.NON_DELETED);
|
||||
ApplicationPipeline appPipeline =
|
||||
JsonUtils.convertValue(updated.getSourceConfig().getConfig(), ApplicationPipeline.class);
|
||||
IngestionPipeline original = JsonUtils.deepCopy(updated, IngestionPipeline.class);
|
||||
updated.setSourceConfig(
|
||||
updated.getSourceConfig().withConfig(appPipeline.withAppConfig(appConfiguration)));
|
||||
updated.getSourceConfig().withConfig(appPipeline.withAppConfig(decryptedConfig)));
|
||||
repository.update(null, original, updated, updatedBy);
|
||||
}
|
||||
|
||||
private void createAndBindIngestionPipeline(
|
||||
IngestionPipelineRepository ingestionPipelineRepository, Map<String, Object> config) {
|
||||
Map<String, Object> decryptedConfig = decryptConfiguration(config);
|
||||
MetadataServiceRepository serviceEntityRepository =
|
||||
(MetadataServiceRepository) Entity.getEntityRepository(Entity.METADATA_SERVICE);
|
||||
EntityReference service =
|
||||
@ -216,7 +222,7 @@ public class AbstractNativeApplication implements NativeApplication {
|
||||
.withConfig(
|
||||
new ApplicationPipeline()
|
||||
.withSourcePythonClass(this.getApp().getSourcePythonClass())
|
||||
.withAppConfig(config)
|
||||
.withAppConfig(decryptedConfig)
|
||||
.withAppPrivateConfig(this.getApp().getPrivateConfiguration())))
|
||||
.withAirflowConfig(
|
||||
new AirflowConfig()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user