https://prefect.io logo
p

Payam Vaezi

11/09/2021, 9:32 PM
After upgrading prefect core and server to
0.15.7
from
0.14.22
we are seeing this error on registration of flow to the server. Any idea why this is happening? Has API contract changed? Also tagging @David Harrington for visibility. Traceback in thread.
Traceback:
Copy code
prefect.exceptions.ClientError: 400 Client Error: Bad Request for url: <http://prefect-server-apollo: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
        }
    }

The passed variables were:

    {"input": {"flow_id": "62bdd54f-16c2-47d6-ba36-7d69646b956f", "serialized_tasks": [{"tags": [], "cache_for": null, "auto_generated": false, "trigger": {"fn": "prefect.triggers.all_successful", "kwargs": {}}, "skip_on_upstream_skip": true, "name": "canary", "slug": "canary-1", "timeout": null, "outputs": "typing.Any", "inputs": {"kwargs": {"required": true, "type": "typing.Any"}}, "max_retries": 0, "retry_delay": null, "cache_key": null, "cache_validator": {"fn": "prefect.engine.cache_validators.never_use", "kwargs": {}}, "type": "mlaasflow.core.engines.prefect.PrefectTransformer", "__version__": "0.15.7"}, {"tags": [], "cache_for": null, "auto_generated": false, "trigger": {"fn": "prefect.triggers.all_successful", "kwargs": {}}, "skip_on_upstream_skip": true, "name": "collect", "slug": "collect-1", "timeout": null, "outputs": "typing.Any", "inputs": {"kwargs": {"required": true, "type": "typing.Any"}}, "max_retries": 0, "retry_delay": null, "cache_key": null, "cache_validator": {"fn": "prefect.engine.cache_validators.never_use", "kwargs": {}}, "type": "mlaasflow.core.engines.prefect.PrefectTransformer", "__version__": "0.15.7"}, {"tags": [], "cache_for": null, "auto_generated": false, "trigger": {"fn": "prefect.triggers.all_successful", "kwargs": {}}, "skip_on_upstream_skip": true, "name": "fork", "slug": "fork-1", "timeout": null, "outputs": "typing.Any", "inputs": {"kwargs": {"required": true, "type": "typing.Any"}}, "max_retries": 0, "retry_delay": null, "cache_key": null, "cache_validator": {"fn": "prefect.engine.cache_validators.never_use", "kwargs": {}}, "type": "mlaasflow.core.engines.prefect.PrefectTransformer", "__version__": "0.15.7"}, {"tags": [], "cache_for": null, "auto_generated": false, "trigger": {"fn": "prefect.triggers.all_successful", "kwargs": {}}, "skip_on_upstream_skip": true, "name": "preprocess", "slug": "preprocess-1", "timeout": null, "outputs": "typing.Any", "inputs": {"kwargs": {"required": true, "type": "typing.Any"}}, "max_retries": 0, "retry_delay": null, "cache_key": null, "cache_validator": {"fn": "prefect.engine.cache_validators.never_use", "kwargs": {}}, "type": "mlaasflow.core.engines.prefect.PrefectTransformer", "__version__": "0.15.7"}, {"tags": [], "cache_for": null, "auto_generated": false, "trigger": {"fn": "prefect.triggers.all_successful", "kwargs": {}}, "skip_on_upstream_skip": true, "name": "sink", "slug": "sink-1", "timeout": null, "outputs": "typing.Any", "inputs": {"kwargs": {"required": true, "type": "typing.Any"}}, "max_retries": 0, "retry_delay": null, "cache_key": null, "cache_validator": {"fn": "prefect.engine.cache_validators.never_use", "kwargs": {}}, "type": "mlaasflow.core.engines.prefect.PrefectTransformer", "__version__": "0.15.7"}, {"tags": [], "cache_for": null, "auto_generated": false, "trigger": {"fn": "prefect.triggers.all_successful", "kwargs": {}}, "skip_on_upstream_skip": true, "name": "source", "slug": "source-1", "timeout": null, "outputs": "typing.Any", "inputs": {"kwargs": {"required": true, "type": "typing.Any"}}, "max_retries": 0, "retry_delay": null, "cache_key": null, "cache_validator": {"fn": "prefect.engine.cache_validators.never_use", "kwargs": {}}, "type": "mlaasflow.core.engines.prefect.PrefectTransformer", "__version__": "0.15.7"}]}}
I confirmed prefect server version is
Copy code
k exec -it prefect-server-graphql-667cc66d6f-t8gzp -- /bin/bash
I have no name!@prefect-server-graphql-667cc66d6f-t8gzp:/prefect-server$ python
Python 3.7.11 (default, Aug 17 2021, 03:29:57)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import prefect
>>> prefect.__version__
'0.15.4+23.gda07d2551'
a bit different on the patch version, don't know if that matters.
k

Kevin Kho

11/09/2021, 9:53 PM
Hey @Payam Vaezi, can we move the traceback to the thread to keep the channel a bit more compact? Just confirming Server is on 0.15.4 and you registered from 0.15.7?
p

Payam Vaezi

11/09/2021, 9:56 PM
Just moved it. And yes, versions are what you stated.
k

Kevin Kho

11/09/2021, 9:58 PM
I think Server version needs to be greater than Registration version because the registration can hit API routes that don’t exist if the server version is lower.
upvote 1
And thanks for moving it!
z

Zanie

11/09/2021, 10:15 PM
It seems likely you are encountering this breaking change for flow registration https://github.com/PrefectHQ/prefect/blob/master/CHANGELOG.md#breaking-changes
p

Payam Vaezi

11/10/2021, 3:46 PM
Thanks for pointing out to the changelogs, we updated the prefect server to 2021.11.09 and it solved our breaking change problem.
2 Views