Bharat Khaneja
02/21/2025, 2:06 PMtest_executor_bkhaneja.from_source(
source=str(Path(__file__).parent.resolve()),
entrypoint=f"{Path(__file__).name}:test_executor_bkhaneja",
).deploy(Test Deployment", work_pool_name="cla-infra", cron="15 3 * * WED", concurrency_limit=1)
but when I upgraded Prefect today, is it giving 422Marvin
02/21/2025, 2:06 PMBharat Khaneja
02/21/2025, 2:22 PMraise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Client error '422 Unprocessable Entity' for url 'https://******/api/deployments/1146fa5e-613e-40b8-8111-92c505040879'
Response: {'exception_message': 'Invalid request received.', 'exception_detail': [{'type': 'extra_forbidden', 'loc': ['body', 'parameter_openapi_schema'], 'msg': 'Extra inputs are not permitted', 'input': {'title': 'Parameters', 'type': 'object', 'properties': {}}}, {'type': 'extra_forbidden', 'loc': ['body', 'pull_steps'], 'msg': 'Extra inputs are not permitted', 'input': [{'prefect.deployments.steps.set_working_directory': {'directory': '/home/bkhaneja'}}]}], 'request_body': {'version': '970d4a3f46d4c67a04ad00d108fd4e47', 'description': None, 'parameters': {}, 'paused': False, 'schedules': [], 'concurrency_limit': 1, 'concurrency_options': None, 'tags': [], 'work_queue_name': None, 'work_pool_name': 'cla-infra', 'job_variables': {}, 'entrypoint': 'create_cla_deployments.py:shutdown_automation_executor', 'enforce_parameter_schema': True, 'parameter_openapi_schema': {'title': 'Parameters', 'type': 'object', 'properties': {}}, 'pull_steps': [{'prefect.deployments.steps.set_working_directory': {'directory': '/home/bkhaneja'}}]}}
For more information check: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422>
Marvin
02/21/2025, 2:22 PMparameter_openapi_schema
and pull_steps
. This suggests that recent changes in Prefect may have introduced stricter validation on deployment requests, disallowing these extra inputs.
Here's what you can do:
1. Review Deployment Configuration: Ensure your deployment configuration is in line with the latest Prefect specifications. It seems that parameter_openapi_schema
and pull_steps
are not expected in the request body. You might need to remove or adjust these fields in your deployment setup.
2. Check Prefect Documentation: The Prefect YAML documentation might provide insights into the correct structure for deployment configurations. It could help you identify any deprecated or unsupported fields.
3. Update Prefect Client and Server: Ensure both your Prefect client and server are updated to compatible versions to prevent any discrepancies in API expectations.
If these steps do not resolve the issue, consider reaching out to the Prefect community or checking for any additional updates or patches that might address this specific validation problem.