improve workflow creation logic, and boundaries between r-server and r-w-controller #478
Labels
integration/gitlab
REANA-GitLab integration issues.
priority/longterm
size/l
system/design
system/refactor
type/enhancement
type/rfc
While working on #474, I realized that the logic of fetching GitLab repositories is quite complicated, and spread across r-server and r-w-controller. This makes it hard to add new things, plus easy to introduce bugs. An example is an above-mentioned issue where the workflow flow looked like this:
r-server
, so we are dealing with a repository that had recently a commit;reana.yaml
from the Gitlab repo, and createreana_specification
; this specification is incomplete as engines like Yadage, CWL, and Snakemake require more files;r-w-controller
to create a workflow passingreana_specification
, and fetch Gitlab repository;r-server
, where, before gitlab: specification for Snakemake and CWL workflows is not loaded correctly #474, only Yadage specification was updated; that is why CWL and Snakemake were failing, we forgot to updatereana_specification
there; below is the chunk that is responsible for update:reana-server/reana_server/rest/workflows.py
Lines 424 to 434 in a793ce0
We also have similar update logic in a different endpoint, not sure why it is there:
reana-server/reana_server/rest/workflows.py
Lines 941 to 942 in a793ce0
workflow-submission
queue, so it can start.The flow above spreads logic for fetching and creating workflows accross two services.
An example of a better flow is the recently added
/launch
endpoint:reana_specification
based on all files from the fetched repository;r-w-controller
to create a workflow;workflow-submission
queue, so it can start.It still has things that, probably, are a better fit for
r-w-controller
like creatingreana_specification
and publishing workflow, but at least it doesn't have a tricky logic with updatingreana_specification
.Proposed actions
r-server
andr-w-controller
and enforce them in the future.r-server
tor-w-controller
and vice-versa. For example (this is subject to discussions):r-server
and merged withlaunch
fetcher, forming a single fetcher codebase responsible for all external workflow sources;reana_specification
inr-server
, we can move it tor-w-controller
; in addition, we might change our approach and load specification directly fromreana.yaml
file instead of relying on a client to generate it, related models: rethinkreana_specification
storage philosophy reana-db#162;r-w-controller
; this will be a nice abstraction forr-server
r-server
will be responsible for preparing and fetching files, and, after, it will delegate workflow initiation tor-w-controller
;As mentioned by @audrium, this issue can nicely fit into our future work on making REANA CLI client smaller (so-called "thin client").
The text was updated successfully, but these errors were encountered: