I'm running into an issue with `flow.register()` a...
# prefect-community
a
I'm running into an issue with
flow.register()
and not sure how to troubleshoot. Can anyone help?
I'm using Docker as storage, using the dockerfile method
n
Hi @Adam Roderick - what's the issue you're seeing?
a
flow.register() hangs after logging
Building the flow's Docker storage...
n
Hm that's odd, would you mind sharing some more of the stack trace around that?
a
Sure. It hangs on this self._post function in the docker lib
Copy code
File "C:\dev\datateer\mrp-pipeline/pipelines.py", line 225, in deploy_flow
    flow.register(project_name=PROJECT_NAME)
  File "c:\dev\datateer\mrp-pipeline\venv\main\lib\site-packages\prefect\core\<http://flow.py|flow.py>", line 1366, in register
    no_url=no_url,
  File "c:\dev\datateer\mrp-pipeline\venv\main\lib\site-packages\prefect\client\<http://client.py|client.py>", line 608, in register
    serialized_flow = flow.serialize(build=build)  # type: Any
  File "c:\dev\datateer\mrp-pipeline\venv\main\lib\site-packages\prefect\core\<http://flow.py|flow.py>", line 1222, in serialize
    storage = self.storage.build()  # type: Optional[Storage]
  File "c:\dev\datateer\mrp-pipeline\venv\main\lib\site-packages\prefect\environments\storage\<http://docker.py|docker.py>", line 282, in build
    self._build_image(push=push)
  File "c:\dev\datateer\mrp-pipeline\venv\main\lib\site-packages\prefect\environments\storage\<http://docker.py|docker.py>", line 336, in _build_image
    forcerm=True,
  File "c:\dev\datateer\mrp-pipeline\venv\main\lib\site-packages\docker\api\<http://build.py|build.py>", line 263, in build
    response = self._post(
n
Thanks @Adam Roderick! My suspicion is that your issue is actually with Docker for Windows but I can't be sure. I think most of the team is offline for the night but I can flag this and get someone with more Docker knowledge on it first thing tomorrow.
a
Thanks. I've had successful deployments in the past, but I used the docker base image method.
This looks a little suspicious
built by PursePosixPath earlier in the same file, I believe
n
Is it possible you don't have local access to that registry? Or maybe the registry URL is incorrect? I'm not sure why it would hang for one of those but those are what immediately come to mind
a
I do believe the URL is wrong (see the screenshot above). But something is modifying the URL I pass in from
http://...
to
http:/...
I think I made it past the hanging call
I was passing in a protocol prefix to
Docker(registry_url=...)
After removing the https:// from that argument value, docker no longer hung
n
Ah great to hear @Adam Roderick - so all good with registering now?