Ryan Smith
08/25/2021, 7:00 AMRyan Smith
08/25/2021, 7:00 AMprefect auth login --help
.')ERROR - prefect.CloudTaskRunner | Failed to retrieve task state with error: AuthorizationError('Malformed response received from Cloud - please ensure that you are authenticated. See prefect auth login --help
.')
prefect.exceptions.AuthorizationError: Malformed response received from Cloud - please ensure that you are authenticated. See prefect auth login --help
.Kevin Kho
Ryan Smith
08/25/2021, 3:12 PMprefect backend server
, but I'm not really sure where I should be looking for that since DaskExecutor takes care of spinning itself up for the most part.
Thinking maybe I need to use a custom Docker image as the base image when I'm building the flow storage (currently just referencing prefecthq/prefect:0.15.0
), and then I could "bake" in a call to prefect backend server
in there? Let me know if this feels like the right track or if there might be an easier way.Kevin Kho
prefect backend server
and then I think you just need the config.toml
in that image that points to the right API.
[server]
endpoint = "http://<YOUR_VM_IP>:4200/graphql/"
or maybe you can set the environment variable
PREFECT__SERVER__ENDPOINT
Ryan Smith
08/25/2021, 3:19 PMKevin Kho
LocalRun
, I think env variables are carried over but it if not for the other RunConfigs. Yes this is a common issue though where even if you’re able to send work to the Dask cluster somehow, they won;’t be able to update the state of the tasks if they don’t point to the server correctly.Ryan Smith
08/25/2021, 3:27 PMdask-cloudprovider[aws]
via pip:
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
boto3 1.18.23 requires botocore<1.22.0,>=1.21.23, but you'll have botocore 1.20.106 which is incompatible.
I tried running the image regardless, but it fails to create the DaskCluster complaining something about aiobotocore being used improperly, so clearly there is a real incompatibility somewhere.Kevin Kho
aiobotocore
has a release to 1.4 that broke multiple Dask related things and you would need to go down to 1.3.3 for that.Ryan Smith
08/25/2021, 4:14 PMprefect backend server
and sets the correct ENV var for our server did the trick!Ryan Smith
08/25/2021, 4:16 PMaiobotocore==1.3.3
and boto3==1.17.106
, then I can get pip install to work against the prebuilt 0.15.4
prefect image. My only concern is that the base 0.15.4 prefect image came preinstalled with 1.18.XX of boto3
, do you think I'm going to hit any weird issues by downgrading boto3 as well?Kevin Kho
Vincent
08/26/2021, 1:14 PMPREFECT__BACKEND
and PREFECT__SERVER__HOST
configurations from the agent are passed successfully to the dask-scheduler and dask-workers but in 0.15.0+, the workers no longer inherit this specification from the agent. I have been able to find a work around by using said environment variables in the docker image, but preferably I would like for the agent to pass this info down to the workers. Any suggestions?Kevin Kho
Vincent
08/26/2021, 2:01 PMKevin Kho
Vincent
08/26/2021, 2:08 PMZanie
Vincent
08/26/2021, 4:50 PMZanie
context
(which contains the populated settings
object) to the TaskRunner.run
method which is submitted to the dask workers. This means that settings should be loaded from the context.settings
instead of prefect.settings
where they need to be respected on workers. I suspect that this is a result of my changes in the Client
as I have no knowledge of settings environment variables on dask workers (although it could certainly be happening somewhere).Vincent
08/27/2021, 5:26 PMself
at line 156 for api_server
https://github.com/PrefectHQ/prefect/blob/master/src/prefect/client/client.py#L156
Small bug, but it works now!Zanie
Vincent
08/27/2021, 5:55 PM