r

    Romain

    7 months ago
    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:
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "flow_registration.py", line 136, in <module>
        register_flows(args.local)
      File "flow_registration.py", line 128, in register_flows
        idempotency_key=flow.serialized_hash())
      File "/usr/local/lib/python3.7/site-packages/prefect/core/flow.py", line 1734, in register
        idempotency_key=idempotency_key,
      File "/usr/local/lib/python3.7/site-packages/prefect/client/client.py", line 1213, in register
        variables=dict(input=inputs),
      File "/usr/local/lib/python3.7/site-packages/prefect/client/client.py", line 555, in graphql
        retry_on_api_error=retry_on_api_error,
      File "/usr/local/lib/python3.7/site-packages/prefect/client/client.py", line 459, in post
        retry_on_api_error=retry_on_api_error,
      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
            "update_task"?
    
    The GraphQL query was:
    
        mutation($input: register_tasks_input!) {
                register_tasks(input: $input) {
                    success
            }
        }
    Would anyone have encountered a similar issue?
    Anna Geller

    Anna Geller

    7 months ago
    Two questions for troubleshooting:1. Did your agent and flow registration environment get upgraded too? 2. Did you perform DB migration?
    prefect-server upgrade database
    r

    Romain

    7 months ago
    @Anna Geller indeed it was the db migration missing. Thanks for your help
    Jay Vercellone

    Jay Vercellone

    6 months ago
    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