Skip to content

Commit

Permalink
Use Selector for cluster config config options
Browse files Browse the repository at this point in the history
Only one cluster type may be configured. It is not valid to create
multiple clusters for a client.
  • Loading branch information
kinghuang committed Sep 7, 2020
1 parent ac70a36 commit a90de96
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions python_modules/libraries/dagster-dask/dagster_dask/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,16 @@ def client(self):
is_required=False,
),
"cluster": Field(
{
key: Field(
Permissive(),
is_required=False,
description=f"{meta['name']} cluster configuration.",
)
for key, meta in DaskClusterTypes.items()
},
Selector(
{
key: Field(
Permissive(),
is_required=False,
description=f"{meta['name']} cluster configuration.",
)
for key, meta in DaskClusterTypes.items()
}
),
description="Create a Dask cluster. Will be passed as the client address.",
is_required=False,
),
Expand Down

0 comments on commit a90de96

Please sign in to comment.