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

CQ7 - Outcome #15

Closed
simleo opened this issue Jun 23, 2022 · 5 comments · Fixed by #50
Closed

CQ7 - Outcome #15

simleo opened this issue Jun 23, 2022 · 5 comments · Fixed by #50
Labels
Requirement Something we want to capture in the spec
Milestone

Comments

@simleo
Copy link
Collaborator

simleo commented Jun 23, 2022

Was the execution successful?

Can use actionStatus to FailedActionStatus or CompletedActionStatus - can also provide error.

@simleo simleo added the Requirement Something we want to capture in the spec label Jul 6, 2022
@simleo simleo added this to the 0.1 milestone Sep 1, 2022
@simleo
Copy link
Collaborator Author

simleo commented Sep 1, 2022

Success = Exit status is zero

@simleo
Copy link
Collaborator Author

simleo commented Sep 14, 2022

This is already detailed in https://www.researchobject.org/ro-crate/1.1/provenance.html#recording-changes-to-ro-crates, so we can simply direct the reader there for the JSON-LD details. We just need to add the recommendation to use FailedActionStatus if there was an error (unhandled exception, non-zero exit status) and CompletedActionStatus otherwise. Maybe we should also say that for failed executions the action's object and result could be empty / missing or incomplete.

@stain
Copy link
Contributor

stain commented Oct 17, 2022

Agree to use actionStatus as proposed.

How to show the error message: https://schema.org/error on the CreateAction of tool or ControlAction of the step? Do both of them fail?

Additionally intermediary provenance while a workflow is running could have ActiveActionStatus showing PotentialActionStatus for steps not executed yet.

@simleo
Copy link
Collaborator Author

simleo commented Jan 19, 2023

The StreamFlow implementation is already using actionStatus on CreateAction instances (both the workflow run and the tool runs). Other actions represented in the profiles are the step executions (ControlAction) and the workflow engine execution (OrganizeAction).

One could try to be as precise as possible and mark failures (actionStatus: FailedActionStatus and optionally error: <ERROR DESCRIPTION>) exactly where they happen. So if the workflow engine itself fails (e.g., bad parameters passed to the cwltool executable, or a cwltool bug), there should be a failure in the OrganizeAction, and the other actions should probably be missing altogether from the crate. Similarly, if an error can be ascribed to the workflow's own code (and not to one of the tools it orchestrates), then there should be a failure in the workflow's CreateAction, and actions corresponding to steps / tools that were not executed should be missing. When does a step execution (ControlAction) fail? In this case the instrument is the step itself, i.e., a logical section of the workflow. In principle it could be said that the error happens exactly in the step execution (and not in the tool execution) if the tool does not even begin to run, i.e., the failure happens while the step is "being prepared". This could be hard to pinpoint: some workflow engines might not even have a step preparation concept. Mapping errors in the execution of the tool (either the wrapper or the wrapped command) is more straightforward: they should be reported in the corresponding CreateAction.

Another thing to consider is dependencies between the actions. For instance, if a step fails, then the workflow also fails; If a tool fails, then the corresponding step and the workflow also fail.

We should try to avoid making things too complicated in the profiles, making sure they stay flexible. I think the main things to cover are:

  • Recommend using CompletedActionStatus for successful actions and FailedActionStatus for failed ones; in the latter case, a consumer should not assume the presence of object / result in the action, nor the presence of dependent actions in the crate
  • Recommend propagating FailedActionStatus to dependent actions
  • Don't make specifying actionStatus a MUST, but say that consumers will assume a successful action in this case
  • Specifying error needs to be optional (additional information might not be available)

I would leave ActiveActionStatus and PotentialActionStatus out for now.

@simleo
Copy link
Collaborator Author

simleo commented Jan 30, 2023

Another thing to consider is dependencies between the actions. For instance, if a step fails, then the workflow also fails; If a tool fails, then the corresponding step and the workflow also fail.

As discussed at the last meeting, this is not always true due to the fault tolerance featured by some engines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Requirement Something we want to capture in the spec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants