Guilins
01/08/2025, 7:08 PMprefect.deployments.runner.DeploymentApplyError: Error while applying deployment: Client error '422 Unprocessable Entity' for url '<http://localhost:4200/api/deployments/>'
Response: {'exception_message': 'Invalid request received.', 'exception_detail': [{'type': 'extra_forbidden', 'loc': ['body', 'infra_overrides'], 'msg': 'Extra inputs are not permitted', 'input': {}}, {'type': 'extra_forbidden', 'loc': ['body', 'manifest_path'], 'msg': 'Extra inputs are not permitted', 'input': None}
Marvin
01/08/2025, 7:08 PM422 Unprocessable Entity
, often occurs due to Prefect 3.x's stricter handling of deployment parameters. Specifically, the infra_overrides
and manifest_path
fields are not recognized in the context you're attempting to use them.
Here are some key points to address this issue:
1. Work Pools and Job Variables: Prefect 3.x uses work pools and job variables for infrastructure configuration. Ensure that you are using the correct fields for your deployment. The fields like infra_overrides
and manifest_path
are not valid inputs in Prefect 3.x deployments. You should instead focus on using job_variables
to customize infrastructure settings.
2. Deployment Method: Ensure you are using the correct deployment method. Prefect 3.x recommends using the from_source
method for deployments, and you should configure your deployment using a prefect.yaml
file or the Python deployment method.
3. Review Documentation: Review the Prefect 3.x deployment documentation to ensure you are following the updated practices for defining and deploying flows.
4. GitHub Issues: There are related issues on GitHub, such as this one, which discuss similar errors. These might provide additional insights or workarounds specific to your use case.
5. Common 3.x Gotchas: Prefect 3.x has several changes from 2.x, such as the replacement of agents with workers and the introduction of work pools. Make sure your deployment process aligns with these changes.
You may need to refactor your deployment configuration to adhere to these new standards in Prefect 3.x. If you have specific configurations you need help translating, feel free to share them.Dylan
Guilins
01/08/2025, 7:09 PMDylan
prefect version
command availableGuilins
01/08/2025, 7:10 PMNate
01/08/2025, 7:10 PMinfra_overrides
in your code anywhere? if you did have the right versions and you were using that instead of the new alias (job_variables) then this might also happenGuilins
01/08/2025, 7:12 PMNate
01/08/2025, 7:12 PMjob_variables
directlyGuilins
01/08/2025, 7:13 PMGuilins
01/08/2025, 7:14 PMDylan
Guilins
01/08/2025, 7:17 PMGuilins
01/08/2025, 7:17 PMDylan
manifest_path
?Guilins
01/08/2025, 7:19 PMGuilins
01/08/2025, 7:24 PMGuilins
01/08/2025, 7:25 PMResponse: {'exception_message': 'Invalid request received.', 'exception_detail': [{'type': 'extra_forbidden', 'loc': ['body', 'infra_overrides'], 'msg': 'Extra inputs are not permitted', 'input': {}}, {'type': 'extra_forbidden', 'loc': ['body', 'manifest_path'], 'msg': 'Extra inputs are not permitted', 'input': None}, {'type': 'extra_forbidden', 'loc': ['body', 'schedule'], 'msg': 'Extra inputs are not permitted', 'input': None}], 'request_body': {'infra_overrides': {}, 'name': 'metal', 'flow_id': '18618ee8-f2cc-4a89-9db3-28792647185f', 'paused': False, 'schedules': [], 'enforce_parameter_schema': False, 'parameter_openapi_schema': {'title': 'Parameters', 'type': 'object', 'properties': {}}, 'parameters': {}, 'tags': [], 'manifest_path': None, 'work_queue_name': None, 'storage_document_id': None, 'infrastructure_document_id': None, 'schedule': None, 'description': None, 'path': '.', 'version': '0b22fdd21939f5ed92e9627cfebabd16', 'entrypoint': 'flows/metal/flow.py:metal_pipeline'}}
Guilins
01/08/2025, 7:26 PMNate
01/08/2025, 7:47 PM'manifest_path': None, 'storage_document_id': None, 'infrastructure_document_id': None,
all three of these are completely removed in 3.x, which makes me think you have a Deployment.build_from_flow
or other some 2.x style deployment definition somewhereGuilins
01/09/2025, 7:34 PMif __name__ == "__main__":
metal_pipeline()
metal_pipeline.serve(name="metal")
Guilins
01/09/2025, 7:34 PMGuilins
01/13/2025, 5:28 PM