-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: transfer process states stuck in RUNNING (#653)
- Loading branch information
1 parent
b064eb1
commit d733cec
Showing
9 changed files
with
119 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!-- PROJECT LOGO --> | ||
<br /> | ||
<div align="center"> | ||
<a href="https://github.com/sovity/edc-extensions"> | ||
<img src="https://raw.githubusercontent.com/sovity/edc-ui/main/src/assets/images/sovity_logo.svg" alt="Logo" width="300"> | ||
</a> | ||
|
||
<h3 align="center">EDC-Connector Extension:<br />Transfer Process Status Checker</h3> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/sovity/edc-extensions/issues/new?template=bug_report.md">Report Bug</a> | ||
· | ||
<a href="https://github.com/sovity/edc-extensions/issues/new?template=feature_request.md">Request Feature</a> | ||
</p> | ||
</div> | ||
|
||
## About this Extension | ||
|
||
Bugfix extension for `Eclipse EDC [0.2.1, 0.3)`, marks transfer processes as `COMPLETED`. | ||
|
||
## Why does this extension exist? | ||
|
||
We cannot directly upgrade to `Eclipse EDC >=0.3` now, but will of course do so soon. | ||
|
||
## License | ||
|
||
Apache License 2.0 - see [LICENSE](../../LICENSE) | ||
|
||
## Contact | ||
|
||
sovity GmbH - [email protected] |
23 changes: 23 additions & 0 deletions
23
extensions/transfer-process-status-checker/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
val edcVersion: String by project | ||
val edcGroup: String by project | ||
|
||
plugins { | ||
`java-library` | ||
`maven-publish` | ||
} | ||
|
||
dependencies { | ||
api("${edcGroup}:transfer-spi:${edcVersion}") | ||
testImplementation("${edcGroup}:junit:${edcVersion}") | ||
} | ||
|
||
val sovityEdcExtensionGroup: String by project | ||
group = sovityEdcExtensionGroup | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>(project.name) { | ||
from(components["java"]) | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...src/main/java/de/sovity/edc/extension/transfer/TransferProcessStatusCheckerExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright (c) 2022 sovity GmbH | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* sovity GmbH - initial API and implementation | ||
* | ||
*/ | ||
|
||
package de.sovity.edc.extension.transfer; | ||
|
||
import org.eclipse.edc.connector.transfer.spi.status.StatusCheckerRegistry; | ||
import org.eclipse.edc.runtime.metamodel.annotation.Inject; | ||
import org.eclipse.edc.spi.system.ServiceExtension; | ||
import org.eclipse.edc.spi.system.ServiceExtensionContext; | ||
|
||
import java.util.List; | ||
|
||
public class TransferProcessStatusCheckerExtension implements ServiceExtension { | ||
private static final String EXTENSION_NAME = "Transfer Process Status Checker"; | ||
|
||
@Inject | ||
private StatusCheckerRegistry statusCheckerRegistry; | ||
|
||
@Override | ||
public String name() { | ||
return EXTENSION_NAME; | ||
} | ||
|
||
@Override | ||
public void initialize(ServiceExtensionContext context) { | ||
List.of("HttpProxy", "HttpData").forEach(this::registerStatusChecker); | ||
} | ||
|
||
private void registerStatusChecker(String transferType) { | ||
statusCheckerRegistry.register(transferType, (transferProcess, resources) -> true); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...-checker/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
de.sovity.edc.extension.transfer.TransferProcessStatusCheckerExtension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters