Dmitry
10/03/2024, 12:33 PMawait client.read_deployment_by_name("my-code-baked-into-an-image-deployment")
this code throws the following error
prefect.exceptions.PrefectHTTPStatusError: Client error '404 Not Found' for url '<http://127.0.0.1:4200/api/deployments/name/my-code-baked-into-an-image-deployment>'
Response: {'detail': 'Not Found'}
however, if I do
await client.read_deployments()
I get the following
[DeploymentResponse(id=UUID('50c25578-907f-4b8b-9c42-a8490a07b15d'), name='my-code-baked-into-an-image-deployment', version='d734042c67a0f986a50ec6a296e915ed', description='None', flow_id=UUID('f6dfa4f5-8dcb-4136-a401-45d4c9bfb262'), concurrency_limit=None, global_concurrency_limit=None, concurrency_options=None, paused=False, schedules=[], job_variables={'image': 'lazydynamics/big_flow:2024-10-03t12-04-21-928068-00-00'}, parameters={}, pull_steps=[], tags=[], work_queue_name='default', last_polled=DateTime(2024, 10, 3, 12, 31, 46, 268942, tzinfo=Timezone('UTC')), parameter_openapi_schema={'title': 'Parameters', 'type': 'object', 'properties': {'name1': {'position': 0, 'title': 'name1', 'type': 'string'}, 'name2': {'position': 1, 'title': 'name2', 'type': 'string'}}, 'required': ['name1', 'name2']}, path='.', entrypoint='test_flow.py:big_flow', storage_document_id=None, infrastructure_document_id=None, created_by=None, updated_by=None, work_queue_id=None, enforce_parameter_schema=True, work_pool_name='my-docker-pool', status=DeploymentStatus.READY), DeploymentResponse(id=UUID('8d4a6976-ba25-4f65-86c7-0b609b92794b'), name='my-first-deployment', version='e75f7cebf67691a07876ee8a4d2b1bd3', description='None', flow_id=UUID('f6dfa4f5-8dcb-4136-a401-45d4c9bfb262'), concurrency_limit=None, global_concurrency_limit=None, concurrency_options=None, paused=False, schedules=[], job_variables={}, parameters={}, pull_steps=[], tags=['onboarding'], work_queue_name=None, last_polled=DateTime(2024, 10, 3, 12, 1, 6, 787420, tzinfo=Timezone('UTC')), parameter_openapi_schema={'title': 'Parameters', 'type': 'object', 'properties': {'name1': {'position': 0, 'title': 'name1', 'type': 'string'}, 'name2': {'position': 1, 'title': 'name2', 'type': 'string'}}, 'required': ['name1', 'name2']}, path='.', entrypoint='test_flow.py:big_flow', storage_document_id=None, infrastructure_document_id=None, created_by=None, updated_by=None, work_queue_id=None, enforce_parameter_schema=True, work_pool_name=None, status=DeploymentStatus.NOT_READY)]
Where I can see that first deployment matches the name I'm trying to use in the read_deployment_by_name
. I also can see this deployment in the UI with no problem. What am I doing wrong?Dmitry
10/03/2024, 12:35 PMawait client.read_deployment_by_name("big_flow/my-code-baked-into-an-image-deployment")
but get the same errorDmitry
10/03/2024, 12:37 PMbig-flow/my-code-baked-into-an-image-deployment
where _
is replaced with -
Bianca Hoch
10/03/2024, 7:23 PM