while running the deployemnt from ui in prefect 2....
# prefect-community
h
while running the deployemnt from ui in prefect 2.0.1 . athough the directory exists
should i copy my deployments in docker file?
a
Hey @haris khan make sure, that you run your "prefect build" command from the same folder or a parent folder of where your flow python file is located! And don't use absolute paths in the build command. I think this resolves your issue. Do not use "prefect deployment build /home/haris/Desktop/snowflake/yourflow.py" but use prefect deployment build yourflow.py
h
thank you . it worked however i am getting a server timeout job = batch_client.create_namespaced_job(self.namespace, job_manifest) File "/usr/local/lib/python3.8/site-packages/kubernetes/client/api/batch_v1_api.py", line 210, in create_namespaced_job return self.create_namespaced_job_with_http_info(namespace, body, **kwargs) # noqa: E501 File "/usr/local/lib/python3.8/site-packages/kubernetes/client/api/batch_v1_api.py", line 309, in create_namespaced_job_with_http_info return self.api_client.call_api( File "/usr/local/lib/python3.8/site-packages/kubernetes/client/api_client.py", line 348, in call_api return self.__call_api(resource_path, method, File "/usr/local/lib/python3.8/site-packages/kubernetes/client/api_client.py", line 180, in __call_api response_data = self.request( File "/usr/local/lib/python3.8/site-packages/kubernetes/client/api_client.py", line 391, in request return self.rest_client.POST(url, File "/usr/local/lib/python3.8/site-packages/kubernetes/client/rest.py", line 275, in POST return self.request("POST", url, File "/usr/local/lib/python3.8/site-packages/kubernetes/client/rest.py", line 234, in request raise ApiException(http_resp=r) kubernetes.client.exceptions.ApiException: (500) Reason: Internal Server Error HTTP response headers: HTTPHeaderDict({'Audit-Id': 'c94033e6-af19-414c-8c50-72811876a885', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '1133f237-04af-4269-a466-2f5eb69e6670', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'e6f943c5-ae55-45d1-ab0e-cb0161b8bd0e', 'Date': 'Wed, 03 Aug 2022 101029 GMT', 'Content-Length': '264'}) HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"The POST operation against Job.batch could not be completed at this time, please try again.","reason":"ServerTimeout","details":{"name":"POST","group":"batch","kind":"Job"},"code":500}
a
Do you use prefect 2.0 cloud or do you run the prefect server on your own k8s cluster? this seems to be a problem with your kubernetes cluster, or your prefect agent on the kubernetes cluster. Did you use a service account with the prefect agent - which is allowed to spawn jobs? If you use cloud, have a look at the agent manifests here: https://discourse.prefect.io/t/how-to-deploy-a-prefect-2-0-agent-to-a-local-kubernetes-cluster-and-connect-it-to-cloud-2-0-backend/979