Skip to content
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
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ jackson = ["jackson-annotations", "jackson-databind"]
jersey-core = ["jersey-server", "jersey-common", "jersey-jackson", "jersey-multipart", "jersey-inject", "jersey-servlet", "jersey-servletcore"]

[plugins]
edc-build = { id = "org.eclipse.edc.edc-build", version = "1.1.2" }
edc-build = { id = "org.eclipse.edc.edc-build", version = "1.1.5" }
shadow = { id = "com.gradleup.shadow", version = "9.3.1" }
swagger = { id = "io.swagger.core.v3.swagger-gradle-plugin", version.ref = "swagger" }
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package org.eclipse.edc.connector.dataplane.spi.iam;

import org.eclipse.edc.connector.dataplane.spi.DataFlow;
import org.eclipse.edc.spi.result.Result;
import org.eclipse.edc.spi.types.domain.DataAddress;
import org.eclipse.edc.spi.types.domain.transfer.DataFlowStartMessage;
Expand All @@ -37,9 +36,6 @@ public interface DataPlaneAuthorizationService {
* <p>
* In addition, this service checks whether the token has permission to access the data identified by the {@code requestData} parameter, which could be a URL,
* or query params, etc.
* <p>
* The result (if successful) of this method is the original {@link DataAddress} that was passed to a previous invocation of
* {@link DataPlaneAuthorizationService#createEndpointDataReference(DataFlow)}, i.e. {@link DataFlowStartMessage#getSourceDataAddress()}.
*
* @param token The raw, encoded token, e.g. serialized JWT
* @param requestData Additional information about the request, such as a URL, query params, headers, etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void register(Trigger<SE> trigger) {
public <E extends Event> void on(EventEnvelope<E> envelope) {

try {
TimeUnit.MILLISECONDS.sleep(100);
TimeUnit.MILLISECONDS.sleep(50);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
Expand All @@ -67,9 +67,13 @@ public <E extends Event> void on(EventEnvelope<E> envelope) {
var event = baseEventPayload.cast(envelope.getPayload());
transactionContext.execute(() -> {
var id = idFromEventPayload.apply(event);
var entity = store.findByIdAndLease(id).getContent();
trigger.action().accept(entity);
update(entity);
store.findByIdAndLease(id)
.onSuccess(entity -> {
trigger.action().accept(entity);
update(entity);
}).onFailure(f -> {
monitor.warning("Cannot find entity %s: %s, so trigger doesn't get executed. Event: %s".formatted(id, f.getReason(), event.getClass().getSimpleName()));
});
});
} catch (Exception e) {
monitor.severe("Generic error while trying to execute TCK trigger on event " + envelope.getPayload().name(), e);
Expand Down