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

feat: introduce allowedTransferTypes in DataPlaneInstance #3952

Merged

Conversation

wolf4ood
Copy link
Contributor

@wolf4ood wolf4ood commented Mar 4, 2024

What this PR changes/adds

Introduces allowedTransferTypes in DataPlaneInstance.

A new select method has been added to DataPlaneSelectorService to support selection based also on the transferType. If it's not present the behaviour will be as today only inspecting source/destination.

The current DataFlowControllers don't use the transferType for selection. For the data plane signaling a new DataFlowController will be introduced #3901 that will take into account the transferType for dispatching the request to the right data plane.

Why it does that

enabling data plane signaling protocol for selecting the correct data plane instance

Linked Issue(s)

Closes #3943

@wolf4ood wolf4ood added enhancement New feature or request dpf Feature related to the Data Plane Framework labels Mar 4, 2024
@wolf4ood wolf4ood marked this pull request as ready for review March 4, 2024 14:20
@@ -71,6 +72,10 @@ private void transformProperties(String key, JsonValue jsonValue, DataPlaneInsta
var set = jsonValue.asJsonArray().stream().map(jv -> transformString(jv, context)).collect(Collectors.toSet());
builder.allowedSourceTypes(set);
}
case ALLOWED_TRANSFER_TYPES -> {
var set = jsonValue.asJsonArray().stream().map(jv -> transformString(jv, context)).collect(Collectors.toSet());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be more robust to use transformArray or transformArrayOrObject instead? IIRC they should be able to handle string arrays

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we handle correctly a transforArray or transformArrayOrObject with String.class

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this way, because it's more explicit

@@ -71,6 +72,10 @@ private void transformProperties(String key, JsonValue jsonValue, DataPlaneInsta
var set = jsonValue.asJsonArray().stream().map(jv -> transformString(jv, context)).collect(Collectors.toSet());
builder.allowedSourceTypes(set);
}
case ALLOWED_TRANSFER_TYPES -> {
var set = jsonValue.asJsonArray().stream().map(jv -> transformString(jv, context)).collect(Collectors.toSet());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this way, because it's more explicit

@wolf4ood wolf4ood merged commit 77636db into eclipse-edc:main Mar 4, 2024
19 checks passed
@wolf4ood wolf4ood deleted the feat/3943_dataplane_selection_refactor branch March 4, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dpf Feature related to the Data Plane Framework enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DPS: DataPlane selection refactoring
3 participants