Hi there! I’m trying to start up a new prefect ser...
# prefect-server
g
Hi there! I’m trying to start up a new prefect server in kubernetes (1.2.1) and after getting everything wired up it seems to be missing a decent number of the graphql query definitions, but it does seem to have the mutations defined. For example when running this against the graphql interfact I get an error:
Copy code
query {
            tenant {
                id
        }
    }

With error: 
    GRAPHQL_VALIDATION_FAILED: Cannot query field "tenant" on type "Query".
However I can run the mutation to create a tenant. Did I miss a step or a service somewhere? Thanks!
a
Did you use the helm chart setup? GRAPHQL_VALIDATION_FAILED is generic so hard to say immediately what's the root cause
often this error occurs when you try to access some API route that is not available in your Server version, e.g. I saw one when a user was trying to use API requests for Prefect Cloud (Secrets) on Server
other things to check: • your Hasura version - should be (I think) >= 2.0.9 based on this • whether you have a tenant - you could try to create a default tenant using this command - if you already have a default tenant, then this should fail:
Copy code
prefect server create-tenant --name default --slug default
the last thing I saw here is that you may try adding this environment variable to make it work with Hasura 2.0:
Copy code
You may also need this environment variable:

export HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE=true
g
Thank you very much!! Will go through all of these and see if this works.
👍 1
For that issue it was indeed the HASURA_GRAPHQL environment variable, would never have found that one on my own so thanks! I think I have one more thing to go before this is all working, as some context we are upgrading from 0.13 to 1.2.1, we use kubernetes job_spec yaml files in order to define some annotations and secrets we need to have the job run. The same kubernetes job spec we used to use is no longer working since it appears some values are being lost in translation (in our case the annotations and secrets). We used to use
KubernetesJobEnvironment
for this, but in the newer version it want’s us to use
KubernetesRun
instead. I’ll keep poking around but if you have any insights there that would be amazing
Ah I got it, nevermind! Super appreciate the help, thanks again!
👍 1
a
Gotcha, I understand. Have you seen this migration tutorial? https://docs.prefect.io/orchestration/faq/upgrading_1.0.html it shows how to switch from environments to run configs