https://prefect.io logo
v

Vitaly Shulgin

12/16/2020, 3:09 PM
Hi Prefect community, how can I configure agent to work for specific tenant? There is the error in agent log, is it possible to set it via env var?
Copy code
[2020-12-16 14:48:37,015] ERROR - agent | 400 Client Error: Bad Request for url: <http://prefect-apollo:4200/>

The following error messages were provided by the GraphQL server:

    INTERNAL_SERVER_ERROR: Variable "$input" got invalid value null at
        "input.tenant_id"; Expected non-nullable type UUID! not to be null.

The GraphQL query was:

    mutation($input: get_runs_in_queue_input!) {
            get_runs_in_queue(input: $input) {
                flow_run_ids
        }
    }

The passed variables were:

    {"input": {"before": "2020-12-16T14:48:36.911186+00:00", "labels": ["talynuc", "any"], "tenant_id": null}}
j

josh

12/16/2020, 3:12 PM
Hey @Vitaly Shulgin does your server instance have a default tenant created? If you are running with
prefect server start
then it will create one for you, otherwise you should create one using something like this CLI command
Copy code
prefect server create-tenant --name name_here --slug slug_here
v

Vitaly Shulgin

12/16/2020, 3:16 PM
I created one tenant manually
and, restarted agent in k8s, log looks good now
j

josh

12/16/2020, 3:17 PM
Okay, so by log looks good you mean you aren’t seeing the error anymore?
v

Vitaly Shulgin

12/16/2020, 3:18 PM
yes, I don't see such error any more
👍 1
and, in UI, I see agent joined
17 Views