cylc / cylc-flow

Cylc: a workflow engine for cycling systems.
https://cylc.github.io
GNU General Public License v3.0
335 stars 94 forks source link

GraphQLLocatedError #6487

Closed ColemanTom closed 1 day ago

ColemanTom commented 4 days ago

I was looking in the logs for a workflow and saw

2024-11-19T15:07:37Z CRITICAL - Workflow stalled
2024-11-19T15:07:37Z WARNING - PT1H stall timer starts NOW
2024-11-19T16:07:37Z WARNING - stall timer timed out after PT1H
2024-11-19T23:51:31Z WARNING - /home/cylc-run/access_c4_sy/log/db: write attempt (1) did not complete
2024-11-19T23:51:31Z WARNING - /home/cylc-run/access_c4_sy/log/db: recovered after (1) attempt(s)
2024-11-19T23:51:45Z WARNING - /home/cylc-run/access_c4_sy/log/db: write attempt (1) did not complete
2024-11-19T23:51:45Z WARNING - /home/cylc-run/access_c4_sy/log/db: recovered after (1) attempt(s)
2024-11-20T00:00:41Z CRITICAL - [20241119T2300Z/sy_backup_um_createbc/01:running] (received)failed/EXIT
2024-11-20T00:00:41Z WARNING - [20241119T2300Z/sy_backup_um_createbc:waiting] retrying in PT1M (after 2024-11-20T00:01:41Z)
2024-11-20T01:04:24Z CRITICAL - [20241120T0000Z/sy_backup_um_createbc/01:running] (received)failed/EXIT
2024-11-20T01:04:24Z WARNING - [20241120T0000Z/sy_backup_um_createbc:waiting] retrying in PT1M (after 2024-11-20T01:05:24Z)
2024-11-20T01:06:05Z CRITICAL - [20241120T0000Z/sy_backup_um_createbc/02:running] (received)failed/EXIT
2024-11-20T01:06:05Z WARNING - [20241120T0000Z/sy_backup_um_createbc:waiting] retrying in PT1M (after 2024-11-20T01:07:05Z)
2024-11-20T01:07:29Z CRITICAL - [20241120T0000Z/sy_backup_um_createbc/03:running] (received)failed/EXIT
2024-11-20T01:07:29Z WARNING - [20241120T0000Z/sy_backup_um_createbc/03:failed] did not complete the required outputs:
    ⨯ ⦙  succeeded
Traceback (most recent call last):
  File "/home/miniconda3/cylc-8.3.5/lib/python3.11/site-packages/promise/promise.py", line 844, in handle_future_result
    resolve(future.result())
            ^^^^^^^^^^^^^^^
  File "/home/miniconda3/cylc-8.3.5/lib/python3.11/site-packages/cylc/flow/network/graphql.py", line 433, in async_resolve
    return await next_(root, info, **args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/miniconda3/cylc-8.3.5/lib/python3.11/site-packages/promise/iterate_promise.py", line 10, in iterate_promise
    yield from promise.future  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^
graphql.error.located_error.GraphQLLocatedError: -l select

2024-11-20T02:50:19Z ERROR - -l select
2024-11-20T02:50:19Z ERROR - graphql.error.located_error.GraphQLLocatedError: -l select
2024-11-20T03:39:40Z WARNING - /home/cylc-run/access_c4_sy/log/db: write attempt (1) did not complete
2024-11-20T03:39:41Z WARNING - /home/cylc-run/access_c4_sy/log/db: recovered after (1) attempt(s)

I have no more information than that. I'm unsure if thre is any correlation between the DB write issues (DB is on NFS, which may be a bad thing) and the GraphQLLocatedError.

oliver-sanders commented 1 day ago

Hi,

This error is harmless, it was caused by a user issuing an invalid broadcast command.

The error can be replicated like so:

$ cylc broadcast tmp.hIIRaSDNL7 -s '-l select = foo'
IllegalItemError: -l select

The user will receive a notice explaining the error. On the scheduler side, the error will be logged like so:

graphql.error.located_error.GraphQLLocatedError: -l select

We are currently working at moving to a newer GraphQL server implementation which will handle errors differently, hopefully they will be a little more intuitive.