Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors calling select with a remote DPF selector #4388

Closed
luluffy007 opened this issue Aug 1, 2024 · 7 comments · Fixed by #4391
Closed

Errors calling select with a remote DPF selector #4388

luluffy007 opened this issue Aug 1, 2024 · 7 comments · Fixed by #4391
Assignees
Labels
bug Something isn't working
Milestone

Comments

@luluffy007
Copy link

Bug Report

Describe the Bug

When using the select method on RemoteDataPlaneSelectorService, several errors happens on both the client and the selector API.

On the selector client :

No Transformer registered that can handle class org.eclipse.edc.spi.types.domain.DataAddress -> interface jakarta.json.JsonObject
Cannot deserialize response body as JsonObject
No Transformer registered that can handle class org.eclipse.parsson.JsonObjectBuilderImpl$JsonObjectImpl -> class org.eclipse.edc.connector.dataplane.selector.spi.instance.DataPlaneInstance
No Transformer registered that can handle class org.eclipse.parsson.JsonStringImpl -> class java.lang.Object
DataPlaneInstance must have an URL

On the selector API :

No Transformer registered that can handle class org.eclipse.parsson.JsonObjectBuilderImpl$JsonObjectImpl -> class org.eclipse.edc.connector.dataplane.selector.control.api.model.SelectionRequest
No Transformer registered that can handle class org.eclipse.parsson.JsonObjectBuilderImpl$JsonObjectImpl -> class org.eclipse.edc.spi.types.domain.DataAddress
No Transformer registered that can handle class org.eclipse.parsson.JsonObjectBuilderImpl$JsonObjectImpl -> class java.lang.Object

Expected Behavior

The selector API should return the selected data plane to the remote client.

Context Information

  • EDC 0.8.1
  • Separated data plane, control plane and standalone DPF selector

Possible Implementation

  • For the "No transformer" errors : Register the missing transformers on the data plane selector control API and the data plane selector client.
  • For the "Cannot deserialize response body as JsonObject" and "DataPlaneInstance must have an URL" errors : Configure the jackson mapper and json-ld expansion on DataPlaneSelectorClientExtension and RemoteDataPlaneSelectorService.
@github-actions github-actions bot added the triage all new issues awaiting classification label Aug 1, 2024
Copy link

github-actions bot commented Aug 1, 2024

Thanks for your contribution 🔥 We will take a look asap 🚀

@ndr-brt
Copy link
Member

ndr-brt commented Aug 1, 2024

could you report the build file used to build the runtime that returned the error?

@luluffy007
Copy link
Author

The control plane build file :

plugins {
    `java-library`
    id("application")
    id("com.github.johnrengelman.shadow") version "8.1.1"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation(libs.edc.boot)
    implementation(libs.edc.connector.core)
    implementation(libs.edc.configuration.filesystem)
    implementation(libs.edc.control.plane.core)
    implementation(libs.edc.control.api.configuration)
    implementation(libs.edc.control.plane.api)
    implementation(libs.edc.http)
    implementation(libs.edc.dsp)
    implementation(libs.edc.management.api)
    implementation(libs.edc.data.plane.selector.client)
    implementation(libs.edc.transfer.data.plane.signaling)
    implementation(libs.edc.data.plane.signaling.client)
    implementation(libs.edc.iam.mock)
}

application {
    mainClass.set("org.eclipse.edc.boot.system.runtime.BaseRuntime")
}

tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
    mergeServiceFiles()
    archiveFileName.set("connector.jar")
    setProperty("zip64", true)
}

The selector build file :

plugins {
    `java-library`
    id("application")
    id("com.github.johnrengelman.shadow") version "8.1.1"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation(libs.edc.boot)
    implementation(libs.edc.connector.core)
    implementation(libs.edc.json.ld)
    implementation(libs.edc.configuration.filesystem)
    implementation(libs.edc.http)
    implementation(libs.edc.data.plane.selector.core)
    implementation(libs.edc.data.plane.selector.control.api)
    implementation(libs.edc.control.api.configuration)
    implementation(libs.edc.data.plane.signaling.client)
}

application {
    mainClass.set("org.eclipse.edc.boot.system.runtime.BaseRuntime")
}

tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
    mergeServiceFiles()
    archiveFileName.set("connector.jar")
    setProperty("zip64", true)
}

The data plane build file :

plugins {
    `java-library`
    id("application")
    id("com.github.johnrengelman.shadow") version "8.1.1"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation(libs.edc.boot)
    implementation(libs.edc.connector.core)
    implementation(libs.edc.configuration.filesystem)
    implementation(libs.edc.control.plane.api.client)
    implementation(libs.edc.control.api.configuration)
    implementation(libs.edc.http)
    implementation(libs.edc.data.plane.selector.client)
    implementation(libs.edc.data.plane.self.registration)
    implementation(libs.edc.data.plane.core)
    implementation(libs.edc.data.plane.signaling.api)
    implementation(libs.edc.iam.mock)

    implementation(libs.edc.transfer.spi)
    implementation(libs.edc.data.plane.http)
    implementation(libs.edc.validator.data.address.http.data)
    implementation(libs.edc.validator.data.address.s3)
    implementation(libs.edc.data.plane.aws.s3)
    implementation(libs.edc.data.plane.google.storage)
    implementation(libs.edc.data.plane.util)
}

application {
    mainClass.set("org.eclipse.edc.boot.system.runtime.BaseRuntime")
}

tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
    mergeServiceFiles()
    archiveFileName.set("connector.jar")
    setProperty("zip64", true)
}

@ndr-brt ndr-brt removed the triage all new issues awaiting classification label Aug 2, 2024
@ndr-brt
Copy link
Member

ndr-brt commented Aug 2, 2024

looks like the transformers are not correctly registered in the selector modules. To workaround this you can define an extension and register them by yourself, on the selector side they will be:

  • JsonObjectToSelectionRequestTransformer
  • JsonObjectToDataAddressTransformer
  • JsonValueToGenericTypeTransformer

On the data-plane side (that I assume is what you are referring with client):

  • JsonObjectFromDataAddressTransformer
  • JsonObjectToDataPlaneInstanceTransformer
  • JsonValueToGenericTypeTransformer

EDIT: are we talking about "selection", not "registration" right? In this case the client you are referring to would be the control-plane, not the data-plane.

Could you please detail where those logs are coming from?

@ndr-brt ndr-brt added the bug Something isn't working label Aug 2, 2024
@ndr-brt ndr-brt self-assigned this Aug 2, 2024
@luluffy007
Copy link
Author

Yes I'm talking about the selection on the control plane. The logs are coming from the control plane (selector client) and the selector API output. So the transformers should be registered on the control-plane and the selector.

@luluffy007
Copy link
Author

I made a end to test if it can help : main...luluffy007:Connector:bug-selector-client

@ndr-brt
Copy link
Member

ndr-brt commented Aug 2, 2024

@luluffy007 I already opened a PR: #4391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants