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

Add ContributeAndFinalized replicate statuses #408

Merged
merged 10 commits into from
May 3, 2023
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

## [[NEXT]](https://github.com/iExecBlockchainComputing/iexec-common/releases/tag/vNEXT) 2023

### New Features
- Add `CONTRIBUTE_AND_FINALIZE` replicate statuses. (#408)
### Bug Fixes
- Log `computedFilePath` instead of `computedFileDir`. (#409)

## [[8.0.0]](https://github.com/iExecBlockchainComputing/iexec-common/releases/tag/v8.0.0) 2023-04-12

### Quality
Expand Down
18 changes: 17 additions & 1 deletion src/main/java/com/iexec/common/replicate/ReplicateStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public enum ReplicateStatus {
RESULT_UPLOADING,
RESULT_UPLOAD_FAILED,
RESULT_UPLOADED,
CONTRIBUTE_AND_FINALIZE_ONGOING,
CONTRIBUTE_AND_FINALIZE_FAILED,
CONTRIBUTE_AND_FINALIZE_DONE,
COMPLETING,
COMPLETE_FAILED,
COMPLETED,
Expand Down Expand Up @@ -102,6 +105,8 @@ public static List<ReplicateStatus> getSuccessStatuses() {
CONTRIBUTED,
REVEALING,
REVEALED,
CONTRIBUTE_AND_FINALIZE_ONGOING,
CONTRIBUTE_AND_FINALIZE_DONE,
COMPLETING,
COMPLETED));
}
Expand All @@ -116,6 +121,7 @@ public static List<ReplicateStatus> getFailureStatuses() {
REVEAL_FAILED,
RESULT_UPLOAD_REQUEST_FAILED,
RESULT_UPLOAD_FAILED,
CONTRIBUTE_AND_FINALIZE_FAILED,
COMPLETE_FAILED,
FAILED);
}
Expand All @@ -132,6 +138,7 @@ public static List<ReplicateStatus> getCompletableStatuses() {
RESULT_UPLOADING,
RESULT_UPLOAD_FAILED,
RESULT_UPLOADED,
CONTRIBUTE_AND_FINALIZE_DONE,
COMPLETING,
COMPLETE_FAILED);
}
Expand Down Expand Up @@ -160,6 +167,8 @@ public static List<ReplicateStatus> getFailableStatuses() {
CONTRIBUTED,
REVEALING,
REVEAL_FAILED,
CONTRIBUTE_AND_FINALIZE_ONGOING,
CONTRIBUTE_AND_FINALIZE_FAILED,
ABORTED);
}

Expand Down Expand Up @@ -198,6 +207,9 @@ public static List<ReplicateStatus> getRecoverableStatuses() {
RESULT_UPLOADING,
RESULT_UPLOAD_FAILED, // can complete later
RESULT_UPLOADED,
CONTRIBUTE_AND_FINALIZE_ONGOING,
CONTRIBUTE_AND_FINALIZE_DONE,
CONTRIBUTE_AND_FINALIZE_FAILED,
COMPLETING,
RECOVERING);
}
Expand Down Expand Up @@ -249,6 +261,9 @@ public static List<ReplicateStatus> getNonFinalWorkflowStatuses() {
RESULT_UPLOADING,
RESULT_UPLOAD_FAILED,
RESULT_UPLOADED,
CONTRIBUTE_AND_FINALIZE_ONGOING,
CONTRIBUTE_AND_FINALIZE_FAILED,
jbern0rd marked this conversation as resolved.
Show resolved Hide resolved
CONTRIBUTE_AND_FINALIZE_DONE,
COMPLETING,
COMPLETE_FAILED);
}
Expand Down Expand Up @@ -311,7 +326,8 @@ public static List<ReplicateStatus> getSuccessStatusesBeforeComputed() {
public static List<ReplicateStatus> getUncompletableStatuses() {
return Arrays.asList(
CONTRIBUTE_FAILED,
REVEAL_FAILED
REVEAL_FAILED,
CONTRIBUTE_AND_FINALIZE_FAILED
//RESULT_UPLOAD_REQUEST_FAILED, // still good if don't upload
//RESULT_UPLOAD_FAILED, //still good if don't upload
);
Expand Down