Hello guys, I'm having issues deploying my flow be...
# prefect-server
Hello guys, I'm having issues deploying my flow because it seems like it's trying to append the project_name to the registry_url, when I want the registry_url to be appended with the strdata.name . How can I change this behaviour (it works as expected running it locally) Here's my code:
Copy code
strdata.storage = Docker(registry_url=os.environ["REGISTRY_URL"], #I want the flow name appended in here
# registers the flow to the server/pro d
strdata.register(project_name=os.environ["PROJECT_NAME"]) #but the log tells me there is no repository name = project_name in our registry_url
Hi @bruno.corucho this is could be due to where you provide
being empty. Could you post the full traceback? I’m not sure why it is attempting to use the project_name as the registry url. As the default behavior is that when no registry url is provided it just ignores it from that point on.
For appending the flow name you can provide that to the Docker storage using the image_name kwarg like:
Copy code
Docker(registry_url=os.environ["REGISTRY_URL"], image_name=strdata.name, ...)
Hello Josh, thanks for the quick answer. I am very sure the registry is not empty (in our case it's something like - 123450142216.dkr.ecr.eu-west-1.amazonaws.com) Also, if I set the PROJECT_NAME env. variable == our flow.name, everything goes as intended (it successfully registers/link with our project in the cloud. With name == PROJECT_NAME and appends it to the url which, since they're both the same, also works). I will give the image_name a try and see if it works, but personally, I also couldnt understand why this appending happens (assure this registry_url is not empty ofc) For some additional context, I'm calling the flow's execution from our Gitlab's CI Pipeline, which then stores the flow image in our ECR and then initiates the scheduled task in our prefect cloud (with its agent). This flow is working, although for now, unfortunately, we have the project's name forcefully identical to the flow. I cleared my history but in a few minutes I should get you the log!