eclipse-edc / Connector

EDC core services including data plane and control plane
Apache License 2.0
280 stars 236 forks source link

Dataplane manager is not handling exceptions thrown by DataSource/Sink factories during instance creation #4464

Closed rafaelmag110 closed 1 month ago

rafaelmag110 commented 1 month ago

Bug Report

Describe the Bug

DataSource/Sink factories might throw exceptions in case the createSink() or createSource() fail (i.e. secrets not present in vault). These exceptions should be properly handled by the DataplaneManager.

Expected Behavior

Exception is handled and the retry mechanism in DataPlaneManagerImpl works, eventually leading the dataflow to a FAILED state without breaking the DataplaneManager state machine.

Observed Behavior

Exception is raised and thread fails, leaving the dataflow in an indefinite STARTED state without ever being retried and transitioned to a failed state.

Steps to Reproduce

Steps to reproduce the behavior:

Create a transfer process with a data destination of type AzureStorage that refers to keyName that doesn't exist in the Vault.

Detailed Description

Part of the stack trace.

SEVERE 2024-09-09T10:52:23.581195262 StateMachineManager [DataPlaneManagerImpl] error caught 2024-09-09T10:52:23.581515928Z java.lang.IllegalArgumentException: argument "content" is null 2024-09-09T10:52:23.581750928Z at com.fasterxml.jackson.databind.ObjectMapper._assertNotNull(ObjectMapper.java:5054) 2024-09-09T10:52:23.581761720Z at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3813) 2024-09-09T10:52:23.581769553Z at org.eclipse.edc.json.JacksonTypeManager.readValue(JacksonTypeManager.java:116) 2024-09-09T10:52:23.581771762Z at org.eclipse.edc.connector.dataplane.azure.storage.pipeline.AzureStorageDataSinkFactory.createSink(AzureStorageDataSinkFactory.java:86) 2024-09-09T10:52:23.581774012Z at org.eclipse.edc.connector.dataplane.framework.pipeline.PipelineServiceImpl.transfer(PipelineServiceImpl.java:102) 2024-09-09T10:52:23.581776428Z at org.eclipse.edc.connector.dataplane.framework.manager.DataPlaneManagerImpl.lambda$processReceived$3(DataPlaneManagerImpl.java:212) 2024-09-09T10:52:23.581778553Z at org.eclipse.edc.statemachine.retry.CompletableFutureRetryProcess.process(CompletableFutureRetryProcess.java:50) 2024-09-09T10:52:23.581780678Z at org.eclipse.edc.statemachine.retry.RetryProcess.execute(RetryProcess.java:71)

github-actions[bot] commented 1 month ago

Thanks for your contribution :fire: We will take a look asap :rocket:

ndr-brt commented 1 month ago

already fixed (on an higher level) by https://github.com/eclipse-edc/Connector/pull/4458

ndr-brt commented 1 month ago

wait, was this thrown by CompletableFutureRetryProcess? looks like a different issue so, sorry.