https://prefect.io logo
d

Dr. Jones

01/09/2021, 11:26 AM
I get this error message by the Prefect agent when a scheduled flow is about to start. Can you help me? 🙂
Copy code
[2021-01-09 11:20:53,118] ERROR - My_Agent | 400 Client Error: Bad Request for url: <http://apollo:4200/>

The following error messages were provided by the GraphQL server:

    GRAPHQL_VALIDATION_FAILED: Cannot query field "run_config" on type "flow_run".

The GraphQL query was:

    query {
            flow_run(where: { id: { _in: ["84b340e4-9f74-425b-9abd-27247fdc3759"] }, _or: [{ state: { _eq: "Scheduled" } }, { state: { _eq: "Running" }, task_runs: { state_start_time: { _lte: "2021-01-09T11:20:50.061124+00:00" } } }] }) {
                id
                version
                state
                serialized_state
                parameters
                scheduled_start_time
                run_config
                flow {
                    core_version
                    name
                    storage
                    id
                    environment
                    version
            }
                task_runs(where: { state_start_time: { _lte: "2021-01-09T11:20:50.061124+00:00" } }) {
                    serialized_state
                    version
                    task_id
                    id
            }
        }
    }

The passed variables were:

    null
a

Amanda Wee

01/09/2021, 11:33 AM
Could it be a mismatch in prefect version between the agent and the server? From what I understand the prefect version on the agent should not be newer than that of the server.
upvote 1
d

Dr. Jones

01/09/2021, 12:47 PM
You were right!! Thank you! I thought I had made sure they both used the same version, however I had specified `prefect==0.14.0`in one requirements.txt and
prefect~=0.14.0
in the other. Now it works, thank you 🙂