-
Notifications
You must be signed in to change notification settings - Fork 4
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
Changes from 6 commits
8afa774
b73dd19
0fa95b0
27d6b82
2c4b5f8
13117c8
c461795
258f8ae
62b1bd3
b585b98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,9 @@ public enum ReplicateStatus { | |
RESULT_UPLOADING, | ||
RESULT_UPLOAD_FAILED, | ||
RESULT_UPLOADED, | ||
CONTRIBUTE_AND_FINALIZE_ONGOING, | ||
CONTRIBUTE_AND_FINALIZE_DONE, | ||
CONTRIBUTE_AND_FINALIZE_FAILED, | ||
COMPLETING, | ||
COMPLETE_FAILED, | ||
COMPLETED, | ||
|
@@ -102,6 +105,8 @@ public static List<ReplicateStatus> getSuccessStatuses() { | |
CONTRIBUTED, | ||
REVEALING, | ||
REVEALED, | ||
CONTRIBUTE_AND_FINALIZE_ONGOING, | ||
CONTRIBUTE_AND_FINALIZE_DONE, | ||
COMPLETING, | ||
COMPLETED)); | ||
} | ||
|
@@ -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); | ||
} | ||
|
@@ -132,6 +138,8 @@ public static List<ReplicateStatus> getCompletableStatuses() { | |
RESULT_UPLOADING, | ||
RESULT_UPLOAD_FAILED, | ||
RESULT_UPLOADED, | ||
CONTRIBUTE_AND_FINALIZE_ONGOING, | ||
CONTRIBUTE_AND_FINALIZE_DONE, | ||
COMPLETING, | ||
COMPLETE_FAILED); | ||
} | ||
|
@@ -160,6 +168,9 @@ public static List<ReplicateStatus> getFailableStatuses() { | |
CONTRIBUTED, | ||
REVEALING, | ||
REVEAL_FAILED, | ||
CONTRIBUTE_AND_FINALIZE_ONGOING, | ||
CONTRIBUTE_AND_FINALIZE_DONE, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure about keeping There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do agree with your argument. Thanks for pointing it out! |
||
CONTRIBUTE_AND_FINALIZE_FAILED, | ||
ABORTED); | ||
} | ||
|
||
|
@@ -198,6 +209,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); | ||
} | ||
|
@@ -249,6 +263,9 @@ public static List<ReplicateStatus> getNonFinalWorkflowStatuses() { | |
RESULT_UPLOADING, | ||
RESULT_UPLOAD_FAILED, | ||
RESULT_UPLOADED, | ||
CONTRIBUTE_AND_FINALIZE_ONGOING, | ||
CONTRIBUTE_AND_FINALIZE_DONE, | ||
CONTRIBUTE_AND_FINALIZE_FAILED, | ||
jbern0rd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
COMPLETING, | ||
COMPLETE_FAILED); | ||
} | ||
|
@@ -311,7 +328,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 | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure as
REVEALING
is not part of this list ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand this part, this list should return all "non-uncompletable statuses", which is not the case right now. Also, it is used only for tests in iexec-core.
Let's rework the tests in iexec-core so that we can remove this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I would go for the consistency in a first step and to go for the cleanup in a second one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure about your "non-uncompletable" ?
For me it is the list of states allowing to go to
COMPLETING
state which areREVEALED
(worker part of the consensus)CONTRIBUTE_AND_FINALIZE_DONE
(worker has revealed and has uploaded its results)RESULT_UPLOAD
something as the worker is part of the consensus and if this worker fails, to upload, another one could do it (to check if it is really supported)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look at the only use of this method to understand what I mean:
https://github.com/iExecBlockchainComputing/iexec-core/blob/1e6d93d197b0346c4b46a62278d5b7286e56dd0f/src/test/java/com/iexec/core/replicate/ReplicateListenersTests.java#L164-L175
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some discussions, we've decided to remove
CONTRIBUTE_AND_FINALIZE_ONGOING
from this list.Please see b585b98.