<@ULVA73B9P> I am using this so far ``` test_exec...
# ask-marvin
b
@Marvin I am using this so far
Copy code
test_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 422
m
It seems like your deployment process is encountering a 422 error after upgrading Prefect. This error generally indicates an "Unprocessable Entity," meaning the server understands the content type of the request but was unable to process the contained instructions. The recent release notes do not specifically mention a change that would directly cause this issue, but there are ongoing discussions and issues related to 422 errors on deployment. One relevant issue is related to incompatible Prefect Client and Server versions after a specific update, which might be causing similar errors (GitHub Issue). Here are a few steps you can take: 1. Check Compatibility: Ensure that your Prefect Client and Server versions are compatible. If you are using a locally-hosted Prefect server, this mismatch might be the cause. 2. Review Deployment Configuration: Double-check your deployment configuration to ensure that it aligns with the latest Prefect version's requirements. 3. Inspect API Changes: Verify any changes in the API, especially related to how deployments are defined and executed. If the issue persists, it might be helpful to look into the specific request body and headers being sent during the deployment to identify any discrepancies with what the server expects. For more detailed troubleshooting, you can refer to the Prefect deployment documentation and the GitHub issues for similar cases.
b
This is what I see @Marvin
Copy code
raise 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>
m
The error message you're encountering indicates that the deployment payload contains extra fields that are not permitted, specifically
parameter_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.