https://prefect.io logo
r

Robin

10/15/2020, 10:30 PM
Hey community, I am just getting started with coiled, trying to get a minimal example running on cloud (locally was super simple to get started based on this prefect coiled tutorial). First I need to login to coiled cloud properly, but how? Do I have to call
coiled.Cloud()
explicitly? Or change the coiled config path in the docker image? 🙂 For further context, see failed task id: https://cloud.prefect.io/accure/flow-run/935509e3-a3d5-41db-8cb4-0e9ca36ff56a?logId=e0a0cc4e-1f70-46df-b4cd-078c67082ac3
Copy code
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/prefect/engine/runner.py", line 48, in inner
    new_state = method(self, state, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/prefect/engine/flow_runner.py", line 418, in get_flow_run_state
    with self.check_for_cancellation(), executor.start():
  File "/usr/local/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.8/site-packages/prefect/engine/executors/dask.py", line 260, in start
    with self.cluster_class(**self.cluster_kwargs) as cluster:  # type: ignore
  File "/usr/local/lib/python3.8/site-packages/coiled/cluster.py", line 105, in __init__
    self.cloud = cloud or Cloud.current(asynchronous=asynchronous)
  File "/usr/local/lib/python3.8/site-packages/coiled/core.py", line 180, in current
    raise ValueError("Please first connect with coiled.Cloud(...)")
ValueError: Please first connect with coiled.Cloud(...)
Maybe the error message is explicitly describing, what to do, but it's not entirely forwarded by prefect?
j

Jim Crist-Harif

10/15/2020, 10:37 PM
cc @James Bourbeau, @Matthew Rocklin?
j

James Bourbeau

10/16/2020, 3:30 AM
@Robin does your
/home/zaubeerer/.config/dask/coiled.yaml
configuration file have your Coiled token in it? You can obtain the token at https://cloud.coiled.io/profile
You can also pass the token in through the
DASK_COILED__TOKEN
environment variable
r

Robin

10/16/2020, 9:20 AM
Yes, I used
coiled login
which created the following
coiled.yaml
Copy code
coiled:
  aws:
    region: us-east-2
  server: <https://cloud.coiled.io>
  token: asdf
  user: user_name
I added
DASK_COILED__TOKEN
additionally to the prefect secrets, but it did not do the trick 🤔