fix: implement noop decryptConfig for external app pipeline generation (#23407)

This commit is contained in:
Teddy 2025-09-16 08:01:27 +02:00 committed by GitHub
parent e933089158
commit f54e902bfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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()