prefect-docker-compose
prefect-docker-compose copied to clipboard
Deployment Error
’m trying to create a deployment locally on my company’s server. We already have other agents there, and the deployments were created in the same way.
I’m running prefect deployment build pipe/__main__.py:cons_PESO_aut -n deploy -sb github/peso-dt6 -q peso_dt6_deploy -o deploy --apply,
but it’s returning:
Found flow 'cons-PESO-aut' Deployment YAML created at '/home/emanuel/work/Peso_DT6/deploy.yaml'. Deployment storage GitHub(repository='https://github.com/Princesa-dos-Campos/peso-dt6.git', reference=None, access_token=SecretStr('**********'), include_git_objects=True) does not have upload capabilities; no files uploaded. Pass --skip-upload to suppress this warning. Traceback (most recent call last): File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/cli/_utilities.py", line 41, in wrapper return fn(*args, **kwargs) File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/utilities/asyncutils.py", line 259, in coroutine_wrapper return call() File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 431, in __call__ return self.result() File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 317, in result return self.future.result(timeout=timeout) File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 178, in result return self.__get_result() File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result raise self._exception File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 388, in _run_async result = await coro File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/cli/deployment.py", line 1626, in build deployment_id = await deployment.apply() File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/deployments/deployments.py", line 902, in apply deployment_id = await client.create_deployment( File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/client/orchestration.py", line 1604, in create_deployment response = await self._client.post( File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/httpx/_client.py", line 1892, in post return await self.request( File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/httpx/_client.py", line 1574, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/client/base.py", line 312, in send response.raise_for_status() File "/home/emanuel/.local/share/virtualenvs/Peso_DT6-W4gbCtab/lib/python3.8/site-packages/prefect/client/base.py", line 164, in raise_for_status raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__ prefect.exceptions.PrefectHTTPStatusError: Client error '422 Unprocessable Entity' for url 'http://172.20.10.203:4200/api/deployments/' Response: {'exception_message': 'Invalid request received.', 'exception_detail': [{'loc': ['body', 'schedules'], 'msg': 'extra fields not permitted', 'type': 'value_error.extra'}], 'request_body': {'name': 'deploy', 'flow_id': '9c9dbae9-935e-480c-9618-ab19bd813680', 'schedules': [], 'parameter_openapi_schema': {'title': 'Parameters', 'type': 'object', 'properties': {}}, 'parameters': {}, 'tags': [], 'manifest_path': None, 'work_queue_name': 'peso_dt6_deploy', 'storage_document_id': 'd2922508-14d5-4f5f-bc8b-d461693302ed', 'infrastructure_document_id': 'fc6e6af3-f1ed-44aa-a7ad-7fe1b002e03a', 'schedule': None, 'description': None, 'path': '', 'version': '699e9c757daf1f260d48597e6bd7d74e', 'entrypoint': 'pipe/__main__.py:cons_PESO_aut', 'infra_overrides': {}}} For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422 An exception occurred.
@almemanuel you'll probably get more helpful answers on Prefect's Slack community, but I'll help however I can if you're still trying to solve this.
The first thing I'd check for is a version mismatch between the Perfect server you're trying to reach and the machine you're trying to push the deployment from.
It looks like the server is complaining it received additional info it wasn't expecting, so perhaps you're running a newer version of Prefect locally than the server is running?