Hi Everyone!
I am starting some migration to prefect 2.0 and I'm facing some issues with blocks registering.
Working on:
- prefect 2.0.2
Steps:
## Server side
- prefect orion start --host HOST --port PORT
- prefect config set PREFECT_API_URL=http
HOSTPORT
- prefect config set PREFECT_ORION_UI_API_URL=http
HOSTPORT (this taken from another thread here, otherwise the UI was showing blank pages for every option)
## User side
- prefect config set PREFECT_API_URL=http
HOSTPORT
At this point all semmed OK.
If I try to register (from the user side) a block for using the CLI
- prefect block register --file blocks/docker-block.py
The messages are:
- RuntimeWarning: coroutine 'Block.save' was never awaited
- Successfully registered 1 block
And the UI does not reflect the block.
(docker-block.py)
from prefect.infrastructure.docker import DockerContainer, ImagePullPolicy
docker_block = DockerContainer(image="some-image",
image_pull_policy=ImagePullPolicy.ALWAYS,env=dict(PREFECT_LOGGING_LEVEL="DEBUG"))
docker_block.save("docker-image")
However if I add the block from the UI the change is reflected and shown.
Any advice?