Tom Jordahl
04/14/2025, 6:22 PMJonah Duffin
07/07/2025, 8:40 PMentrypoint
to a flow function is incorrect, perhaps after a file is moved
2. The parameters
fail validation, because a string does not match an allowed list of enums, for example
Your switch seems to catch case #1 and an exception is raised, but case #2 passes with your dry run flag and fails for an actual deployment, because it looks like this exception happens server-side rather than client-side:
Traceback (most recent call last):
File "/Users/jduffin/dev/git/eval/fastpass/.venv/lib/python3.10/site-packages/prefect/deployments/runner.py", line 388, in _create
deployment_id = await client.create_deployment(**create_payload)
File "/Users/jduffin/dev/git/eval/fastpass/.venv/lib/python3.10/site-packages/prefect/client/orchestration/_deployments/client.py", line 823, in create_deployment
response = await self.request("POST", "/deployments/", json=payload)
File "/Users/jduffin/dev/git/eval/fastpass/.venv/lib/python3.10/site-packages/prefect/client/orchestration/base.py", line 53, in request
return await self._client.send(request)
File "/Users/jduffin/dev/git/eval/fastpass/.venv/lib/python3.10/site-packages/prefect/client/base.py", line 361, in send
response.raise_for_status()
File "/Users/jduffin/dev/git/eval/fastpass/.venv/lib/python3.10/site-packages/prefect/client/base.py", line 162, in raise_for_status
raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Client error '422 Unprocessable Entity' for url '<http://localhost:4200/api/deployments/>'
Response: {'exception_message': 'Invalid request received.', 'exception_detail': [{'type': 'value_error', 'loc': ['body'], 'msg': "Value error, Validation failed for field 'harvest_dataset_identifier'. Failure reason: 'example_enum_value' is not valid under any of the given schemas", ....
Nate
07/07/2025, 8:49 PMJonah Duffin
07/08/2025, 1:50 PMJonah Duffin
07/10/2025, 2:09 PMNate
07/12/2025, 2:27 PMNate
07/12/2025, 2:28 PMNate
07/12/2025, 2:28 PMNate
07/12/2025, 2:28 PMJonah Duffin
07/14/2025, 6:59 PM@flow
def my_flow(
arg1: str,
arg2: str,
arg3: str
):
prefect.yaml
- name: 'my_flow deployment'
description: Description here
entrypoint: path/to/my_flow.py:my_flow
path: /opt/prefect/fastpass/
work_pool: *default_kubernetes_pool
parameters:
arg1: 'value1'
arg2: 'value2'
With your latest changes, this fails parameter validation.
Additionally, previously, an extra parameter in the prefect.yaml that is nonexistent in the flow function would be ignored during deployment. It's now failing. Personally I'm okay with this behavior, but others might not expect it.
Last thing I noticed is that previously, a single failed deployment along the way would exit the deployment process. We rely on this behavior to fail our CI/CD process when the prefect deploy
command exits in failure. Now, the prefect deploy --all
command will always complete and will report on failures at the end, which could affect existing expectations that the command fails if something goes wrong. This is another change that I think we'd be okay with, but might not be expected for othersNate
07/14/2025, 7:01 PMJonah Duffin
07/14/2025, 7:18 PM