Hello folks, I recently upgraded our prefect serve...
# prefect-server
Hello folks, I recently upgraded our prefect server to 2022.01.12. I also upgrade our prefect version to 0.15.12. While trying to register our flow, I get this error:
Copy code
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "flow_registration.py", line 136, in <module>
  File "flow_registration.py", line 128, in register_flows
  File "/usr/local/lib/python3.7/site-packages/prefect/core/flow.py", line 1734, in register
  File "/usr/local/lib/python3.7/site-packages/prefect/client/client.py", line 1213, in register
  File "/usr/local/lib/python3.7/site-packages/prefect/client/client.py", line 555, in graphql
  File "/usr/local/lib/python3.7/site-packages/prefect/client/client.py", line 459, in post
  File "/usr/local/lib/python3.7/site-packages/prefect/client/client.py", line 740, in _request
    session=session, method=method, url=url, params=params, headers=headers
  File "/usr/local/lib/python3.7/site-packages/prefect/client/client.py", line 661, in _send_request
    raise ClientError(f"{exc}\n{graphql_msg}") from exc
prefect.exceptions.ClientError: 400 Client Error: Bad Request for url: <http://prefect-server-apollo.emtrails:4200/graphql>

The following error messages were provided by the GraphQL server:

    GRAPHQL_VALIDATION_FAILED: Unknown type "register_tasks_input". Did you mean
        "register_agent_input", "delete_agent_input", "delete_flow_input",
        "delete_tenant_input", or "log_insert_input"?
    GRAPHQL_VALIDATION_FAILED: Cannot query field "register_tasks" on type
        "Mutation". Did you mean "register_agent", "delete_task", "insert_task", or

The GraphQL query was:

    mutation($input: register_tasks_input!) {
            register_tasks(input: $input) {
Would anyone have encountered a similar issue?
Two questions for troubleshooting: 1. Did your agent and flow registration environment get upgraded too? 2. Did you perform DB migration?
Copy code
prefect-server upgrade database
upvote 1
@Anna Geller indeed it was the db migration missing. Thanks for your help
👍 1
To add some info for posterity, make sure your Apollo service is restarted after the migration is completed, so that the changes are picked up at the "controller" level
🙌 1