File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
packages/models-library/src/models_library
director-v2/src/simcore_service_director_v2/utils
web/server/src/simcore_service_webserver/projects Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -78,20 +78,23 @@ class NodeState(BaseModel):
7878 description = "true if the node's outputs need to be re-computed" ,
7979 ),
8080 ] = True
81+
8182 dependencies : Annotated [
8283 set [NodeID ],
8384 Field (
8485 default_factory = set ,
8586 description = "contains the node inputs dependencies if they need to be computed first" ,
8687 ),
8788 ] = DEFAULT_FACTORY
89+
8890 current_status : Annotated [
8991 RunningState ,
9092 Field (
9193 description = "the node's current state" ,
9294 alias = "currentStatus" ,
9395 ),
9496 ] = RunningState .NOT_STARTED
97+
9598 progress : Annotated [
9699 float | None ,
97100 Field (
@@ -103,6 +106,7 @@ class NodeState(BaseModel):
103106
104107 model_config = ConfigDict (
105108 extra = "forbid" ,
109+ populate_by_name = True ,
106110 json_schema_extra = {
107111 "examples" : [
108112 {
@@ -284,7 +288,7 @@ def _convert_old_enum_name(v) -> RunningState:
284288
285289 # the old version of state was a enum of RunningState
286290 running_state_value = _convert_old_enum_name (v )
287- return NodeState . model_validate ({ "currentStatus" : running_state_value } )
291+ return NodeState ( current_status = running_state_value )
288292 return v
289293
290294 @staticmethod
Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ async def compute_pipeline_details(
246246 node_id : NodeState (
247247 modified = node_data .get (kNODE_MODIFIED_STATE , False ),
248248 dependencies = node_data .get (kNODE_DEPENDENCIES_TO_COMPUTE , set ()),
249- currentStatus = node_id_to_comp_task [node_id ].state ,
249+ current_status = node_id_to_comp_task [node_id ].state ,
250250 progress = (
251251 node_id_to_comp_task [node_id ].progress
252252 if node_id_to_comp_task [node_id ].progress is not None
Original file line number Diff line number Diff line change @@ -1024,7 +1024,7 @@ async def update_project_node_state(
10241024 project_id = project_id ,
10251025 node_id = node_id ,
10261026 partial_node = PartialNode .model_construct (
1027- state = NodeState (currentStatus = RunningState (new_state )) # type: ignore[call-arg]
1027+ state = NodeState (current_status = RunningState (new_state ))
10281028 ),
10291029 )
10301030
You can’t perform that action at this time.
0 commit comments