William Reed
08/05/2021, 11:08 PMcurl -X POST <http://localhost:15020/quitquitquit>
to the end of the jobs’ commands and it will shutdown the sidecars. How can I do that with the Helm chart though? Thank you.alex
08/06/2021, 3:12 PM@resource
that is a context manager and call this clean up in the finally
block.
How many solids need to add this resource as required resource key depends on your setup.
We will look towards a better solution to problems like this in the future, but for now resource tear down should consistently happen at the end of any compute.@resource
def sidecar_teardown():
try:
yield 'placeholder'
finally:
shutdown_sidecars()
William Reed
08/06/2021, 4:42 PMkubernetes.client.exceptions.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Fri, 06 Aug 2021 16:26:46 GMT', 'Content-Length': '300'})
HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"a container name must be specified for pod dagster-job-3186e80187c19a2343851c3f37992918-gn8ql, choose one of: [istio-validation istio-proxy dagster-job-3186e80187c19a2343851c3f37992918]","reason":"BadRequest","code":400}\n'
File "/usr/local/lib/python3.7/site-packages/dagster_celery_k8s/executor.py", line 534, in _execute_step_k8s_job
raw_logs = retrieve_pod_logs(pod_name, namespace=job_namespace)
File "/usr/local/lib/python3.7/site-packages/dagster_k8s/utils.py", line 14, in retrieve_pod_logs
return DagsterKubernetesClient.production_client().retrieve_pod_logs(pod_name, namespace)
File "/usr/local/lib/python3.7/site-packages/dagster_k8s/client.py", line 501, in retrieve_pod_logs
name=pod_name, namespace=namespace, _preload_content=False
File "/usr/local/lib/python3.7/site-packages/kubernetes/client/api/core_v1_api.py", line 22929, in read_namespaced_pod_log
return self.read_namespaced_pod_log_with_http_info(name, namespace, **kwargs) # noqa: E501
File "/usr/local/lib/python3.7/site-packages/kubernetes/client/api/core_v1_api.py", line 23062, in read_namespaced_pod_log_with_http_info
collection_formats=collection_formats)
File "/usr/local/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 353, in call_api
_preload_content, _request_timeout, _host)
File "/usr/local/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 184, in __call_api
_request_timeout=_request_timeout)
File "/usr/local/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 377, in request
headers=headers)
File "/usr/local/lib/python3.7/site-packages/kubernetes/client/rest.py", line 243, in GET
query_params=query_params)
File "/usr/local/lib/python3.7/site-packages/kubernetes/client/rest.py", line 233, in request
raise ApiException(http_resp=r)
CeleryK8sRunLauncher
by the way.alex
08/06/2021, 4:45 PMread_namespaced_pod_log
@rex / @johannWilliam Reed
08/06/2021, 4:46 PMjohann
08/06/2021, 4:47 PMalex
08/06/2021, 4:48 PMCeleryK8sRunLauncher
implies CeleryK8sJobExecutor
which issues each solid as a separate job (via celery)William Reed
08/06/2021, 4:48 PMjohann
08/06/2021, 4:48 PMWilliam Reed
08/06/2021, 4:49 PMK8sRunLauncher
. Thanks! 🎉alex
08/09/2021, 9:03 PMWilliam Reed
08/09/2021, 9:18 PMMichael Clawar
12/16/2021, 3:49 PM