2024-05-02 09:52:28 +02:00
@startuml process_branches
actor oc_scheduler as oc
participant graph as graph
participant argoBuilder as argo
entity list_branches as branches
entity graph as argoGraph
oc -> graph : loadGraphFrom(nom_workflow)
activate oc
activate graph
graph --> oc : Graph
oc -> graph : generateArgo()
graph -> graph : createBranches
graph -> argo : new ArgoBuilder(Graph,list_branches)
activate argo
argo -> argo : create list of nodes already written
note top : a node is a component in a link object,\n represented by its ID
argo -> argo
note bottom : We want to prepare the list of branches by removing\n nodes that appears several times\ne.g : two branches :\n1 - 2 2 - 3 3 - 4\n1 - 2 2 - 3 3 - 5\nWe will iterate over each branch to create the component's YAML\n and don't want to create components 1 2 et 3 twice or more
2024-05-16 14:18:43 +02:00
loop computing in graph.computings
argo -> argo : create new container object
argo -> argoGraph : retrieve image name
argo -> argoGraph : add command from the computing component
argo -> argoGraph : add arguments from the computing component
argo -> argoGraph : retrieve environment variables' name from the computing component
argo -> argo : create a new list of Parameter
loop env variable in retrieved env variables
argo -> argo : add a Parameter object to the list with only the name attribute
2024-05-02 09:52:28 +02:00
end
2024-05-16 14:18:43 +02:00
argo -> argo : create a Template object from the name of the component and the Container object
argo -> argo : add attached volume (currently we share the same mounted volume)
argo -> argo : append the new Template
2024-05-02 09:52:28 +02:00
end
2024-05-16 14:18:43 +02:00
argo -> argo : create new Dag object
loop computing in graph.computings
argo -> argo : create a new Task
argo -> argoGraph : add a unique name from the component name and ID in the graph
argo -> argoGraph : add the name of the associated Template
argo -> argoGraph : add the list of environment variables from the component
loop branch in branches
group if component is in the branch
2024-05-02 09:52:28 +02:00
2024-05-16 14:18:43 +02:00
argo -> argo : add the previous component name to the list of dependencies
2024-05-02 09:52:28 +02:00
end
end
2024-05-16 14:18:43 +02:00
argo -> argo : add the task/step to the list of Tasks
2024-05-02 09:52:28 +02:00
end
2024-05-16 14:18:43 +02:00
argo -> argo : add new Template named DAG to the Templates
loop storage in graph.storages
argo -> argo : create a new VolumeClaimTemplate object
argo -> argoGraph : add name from the storage component
argo -> argoGraph : add access mode from the storage component
argo -> argoGraph : add storage capacity from the storage component
2024-05-02 09:52:28 +02:00
end
2024-05-16 14:18:43 +02:00
loop data in graph.data
argo -> argo :
end
2024-05-02 09:52:28 +02:00
2024-05-16 14:18:43 +02:00
argo -> argo : marshal the Workflow to yaml
argo -> argo : write the marshaled object to a .yml file
2024-05-02 09:52:28 +02:00
@enduml