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

build(deps): bump edc from 0.3.0 to 0.3.1 #129

Merged
merged 4 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ format.version = "1.1"
[versions]
assertj = "3.24.2"
awaitility = "4.2.0"
edc = "0.3.0"
edc = "0.3.1"
jakarta-json = "2.0.1"
junit-pioneer = "2.1.0"
jupiter = "5.10.0"
Expand All @@ -26,6 +26,7 @@ edc-build-plugin = { module = "org.eclipse.edc.edc-build:org.eclipse.edc.edc-bui
edc-configuration-filesystem = { module = "org.eclipse.edc:configuration-filesystem", version.ref = "edc" }
edc-connector-core = { module = "org.eclipse.edc:connector-core", version.ref = "edc" }
edc-control-plane-api-client = { module = "org.eclipse.edc:control-plane-api-client", version.ref = "edc" }
edc-control-plane-api = { module = "org.eclipse.edc:control-plane-api", version.ref = "edc" }
edc-control-plane-core = { module = "org.eclipse.edc:control-plane-core", version.ref = "edc" }
edc-control-plane-spi = { module = "org.eclipse.edc:control-plane-spi", version.ref = "edc" }
edc-data-plane-api = { module = "org.eclipse.edc:data-plane-api", version.ref = "edc" }
Expand Down
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ include(":basic:basic-03-configuration")
include(":transfer:transfer-01-file-transfer:file-transfer-consumer")
include(":transfer:transfer-01-file-transfer:file-transfer-provider")
include(":transfer:transfer-01-file-transfer:transfer-file-local")
include(":transfer:transfer-01-file-transfer:status-checker")

include(":transfer:transfer-02-file-transfer-listener:file-transfer-listener-consumer")
include(":transfer:transfer-02-file-transfer-listener:listener")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

import org.apache.http.HttpStatus;
import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.junit.ClassRule;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.DockerComposeContainer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;

import java.io.IOException;
Expand All @@ -45,9 +45,9 @@ public class Transfer04openTelemetryTest {

private final FileTransferSampleTestCommon testUtils = new FileTransferSampleTestCommon(SAMPLE_ASSET_FILE_PATH, DESTINATION_FILE_PATH);

@ClassRule
public static DockerComposeContainer environment =
new DockerComposeContainer(FileTransferSampleTestCommon.getFileFromRelativePath(SAMPLE_FOLDER + DOCKER_COMPOSE_YAML))
@Container
public static DockerComposeContainer<?> environment =
new DockerComposeContainer<>(FileTransferSampleTestCommon.getFileFromRelativePath(SAMPLE_FOLDER + DOCKER_COMPOSE_YAML))
.withLocalCompose(true)
.waitingFor("consumer", Wait.forLogMessage(".*ready.*", 1));

Expand Down
7 changes: 0 additions & 7 deletions transfer/transfer-01-file-transfer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@ authentication. Therefore, we add the property `edc.api.auth.key` and set it to
to configure the consumer's webhook address. We expose the DSP API endpoints on a different port and path than other
endpoints, so the property `edc.dsp.callback.address` is adjusted to match the DSP API port.

The consumer connector also needs the `status-checker` extension for marking the transfer as completed on the consumer
side.

```kotlin
implementation(project(":transfer:transfer-01-file-transfer:status-checker"))
```

## Run the sample

Running this sample consists of multiple steps, that are executed one by one.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ dependencies {

implementation(libs.edc.dsp)

implementation(project(":transfer:transfer-01-file-transfer:status-checker"))

}

application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ plugins {

dependencies {
implementation(libs.edc.control.plane.api.client)
implementation(libs.edc.control.plane.api)
implementation(libs.edc.control.plane.core)
implementation(libs.edc.data.plane.selector.core)
implementation(libs.edc.api.observability)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ web.http.management.port=8182
web.http.management.path=/management
web.http.protocol.port=8282
web.http.protocol.path=/protocol
web.http.control.port=8283
web.http.control.path=/control
edc.samples.transfer.01.asset.path=/path/to/file
edc.dsp.callback.address=http://localhost:8282/protocol
edc.participant.id=provider
edc.ids.id=urn:connector:provider
edc.control.endpoint=http://localhost:8283/control

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,17 @@
package org.eclipse.edc.sample.extension.listener;

import org.eclipse.edc.connector.transfer.spi.observe.TransferProcessObservable;
import org.eclipse.edc.connector.transfer.spi.status.StatusCheckerRegistry;
import org.eclipse.edc.connector.transfer.spi.types.ProvisionedResource;
import org.eclipse.edc.connector.transfer.spi.types.StatusChecker;
import org.eclipse.edc.connector.transfer.spi.types.TransferProcess;
import org.eclipse.edc.runtime.metamodel.annotation.Inject;
import org.eclipse.edc.spi.system.ServiceExtension;
import org.eclipse.edc.spi.system.ServiceExtensionContext;

import java.io.File;
import java.util.List;

public class TransferListenerExtension implements ServiceExtension {

@Inject
private StatusCheckerRegistry statusCheckerRegistry;

@Override
public void initialize(ServiceExtensionContext context) {
var transferProcessObservable = context.getService(TransferProcessObservable.class);
var monitor = context.getMonitor();

transferProcessObservable.registerListener(new MarkerFileCreator(monitor));
statusCheckerRegistry.register("File", new FileStatusChecker());
}

private static class FileStatusChecker implements StatusChecker {
@Override
public boolean isComplete(TransferProcess transferProcess, List<ProvisionedResource> resources) {
var path = transferProcess.getDataDestination().getStringProperty("path");
return path != null && new File(path).exists();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package org.eclipse.edc.sample.extension.transfer;

import org.eclipse.edc.connector.transfer.spi.status.StatusCheckerRegistry;
import org.eclipse.edc.connector.transfer.spi.store.TransferProcessStore;
import org.eclipse.edc.connector.transfer.spi.types.DataRequest;
import org.eclipse.edc.connector.transfer.spi.types.ProvisionedDataDestinationResource;
Expand All @@ -37,15 +36,11 @@ public class TransferSimulationExtension implements ServiceExtension {
@Inject
private TransferProcessStore store;

@Inject
private StatusCheckerRegistry statusCheckerRegistry;

@Inject
private Clock clock;

@Override
public void initialize(ServiceExtensionContext context) {
statusCheckerRegistry.register(TEST_TYPE, (transferProcess, resources) -> false); //never completes
//Insert a test TP after a delay to simulate a zombie transfer
new Timer().schedule(
new TimerTask() {
Expand Down
6 changes: 6 additions & 0 deletions transfer/transfer-04-open-telemetry/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ services:
WEB_HTTP_MANAGEMENT_PATH: /management
WEB_HTTP_PROTOCOL_PORT: 9292
WEB_HTTP_PROTOCOL_PATH: /protocol
WEB_HTTP_CONTROL_PORT: 9193
WEB_HTTP_CONTROL_PATH: /control
EDC_CONTROL_ENDPOINT: http://consumer:9193/control
EDC_DSP_CALLBACK_ADDRESS: http://consumer:9292/protocol
EDC_PARTICIPANT_ID: consumer
EDC_API_AUTH_KEY: password
Expand Down Expand Up @@ -51,6 +54,9 @@ services:
WEB_HTTP_MANAGEMENT_PATH: /management
WEB_HTTP_PROTOCOL_PORT: 8282
WEB_HTTP_PROTOCOL_PATH: /protocol
WEB_HTTP_CONTROL_PORT: 8183
WEB_HTTP_CONTROL_PATH: /control
EDC_CONTROL_ENDPOINT: http://provider:8183/control
EDC_DSP_CALLBACK_ADDRESS: http://provider:8282/protocol
EDC_PARTICIPANT_ID: provider
EDC_SAMPLES_TRANSFER_01_ASSET_PATH: /resources/README.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ dependencies {
implementation(libs.edc.management.api)
implementation(libs.edc.dsp)

implementation(project(":transfer:transfer-01-file-transfer:status-checker"))

runtimeOnly(libs.opentelemetry)
runtimeOnly(libs.edc.jersey.micrometer)
runtimeOnly(libs.edc.jetty.micrometer)
Expand Down Expand Up @@ -74,4 +72,4 @@ tasks.register("copyOpenTelemetryJar") {

tasks.build {
finalizedBy("copyOpenTelemetryJar")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ plugins {
dependencies {

implementation(libs.edc.control.plane.api.client)
implementation(libs.edc.control.plane.api)
implementation(libs.edc.control.plane.core)
implementation(libs.edc.data.plane.selector.core)

Expand Down Expand Up @@ -74,4 +75,4 @@ tasks.register("copyOpenTelemetryJar") {

tasks.build {
finalizedBy("copyOpenTelemetryJar")
}
}
Loading