cylc-uiserver
cylc-uiserver copied to clipboard
handling scheduler error
On current cylc-flow master (before cylc/cylc-flow#4487 is merged) attempting to trigger (without reflow) a task in the UI causes an error in the scheduler, which results in this UIS traceback:
ERROR:graphql.execution.utils:Traceback (most recent call last):
File "/home/oliverh/cylc/cylc-uiserver/venv/lib/python3.9/site-packages/promise/promise.py", line 844, in handle_future_result
resolve(future.result())
File "/home/oliverh/cylc/cylc-uiserver/venv/lib/python3.9/site-packages/cylc/flow/network/graphql.py", line 441, in async_resolve
return await next_(root, info, **args)
File "/home/oliverh/cylc/cylc-uiserver/cylc/uiserver/authorise.py", line 473, in async_resolve
return await next_(root, info, **args)
File "/home/oliverh/cylc/cylc-uiserver/venv/lib/python3.9/site-packages/promise/iterate_promise.py", line 10, in iterate_promise
yield from promise.future # type: ignore
File "/home/oliverh/cylc/cylc-uiserver/venv/lib/python3.9/site-packages/promise/promise.py", line 844, in handle_future_result
resolve(future.result())
File "/home/oliverh/cylc/cylc-uiserver/venv/lib/python3.9/site-packages/cylc/flow/network/schema.py", line 1276, in mutator
res = await resolvers.mutator(info, command, w_args, args)
File "/home/oliverh/cylc/cylc-uiserver/cylc/uiserver/resolvers.py", line 199, in mutator
return await self.workflows_mgr.multi_request(
File "/home/oliverh/cylc/cylc-uiserver/cylc/uiserver/workflows_mgr.py", line 307, in multi_request
for msg_core in list(val.values())[0].get('result')
graphql.error.located_error.GraphQLLocatedError: 'list' object has no attribute 'values'
The UIS code is cylc/uiserver/workflows_mgr.py:multi_request()
:
https://github.com/cylc/cylc-uiserver/blob/121658f35aa2f5a1f629bd9d68f06d09c4fb1ffc/cylc/uiserver/workflows_mgr.py#L293-L309
The value of result
on line 293 is not of type Exception
, it's this:
[
"oliverh|demo/run4",
[
{
"error": {
"message": "force_trigger_tasks() missing 2 required positional arguments: 'reflow' and 'flow_descr'",
"traceback": [
"graphql.error.located_error.GraphQLLocatedError: force_trigger_tasks() missing 2 required positional arguments: 'reflow' and 'flow_descr'\n"
]
}
}
]
]