dask / dask/dask-gateway

Failing late when dask-gateway clients passed options are invalid (could been known by a schema)

Open
#684 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
148
Forks
93
PR merge metrics
No merged PRs in 30d

Description

### How things work

`dask-gateway-server` the server and `dask-gateway` the client can be pre-configured so that the client can send options on how to configure a dask-cluster that the dask-gateway server is to ensure is created.

### Problem situation

A typical case is that one configures dask-gateway-server and client to allow sending details on environment variables. In the following failure, environment variables were something that users could specify via options, but if a user specified them without being string valued they **_errored first at the point in time when workers were created - not when the options were passed_**.

> [...] when specifying `environment` for the dask workers, if any of the values are not strings, it will fail forever without producing a useful error message to the user. The following error message is shown instead:

```
HTTP response headers:
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Pod in version \"v1\" cannot be handled as a Pod: json: cannot unmarshal number into Go struct field EnvVar.spec.containers.env.value of type string","reason":"BadRequest","code":400}
```

### Goals to work towards

To fail earlier when `dask-gateway` client passes config that won't work as can be understood with for example a JSONSchema validation check. Ideally with as little additional complexity introduced as possible in this project as we are very low on maintenance capacity.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.