vincbeck commented on PR #38734:
URL: https://github.com/apache/airflow/pull/38734#issuecomment-2043541309
Hi @dabla, it seems this PR introduced a bug. All our system tests related
to AWS EKS started to fail for the same reason. See error below:
```
ERROR [root] exec: failed to decode process output: Expecting value: line 1
column 41 (char 40)
INFO [airflow.models.taskinstance] ::group::Post task execution logs
ERROR [airflow.task] Task failed with exception
Traceback (most recent call last):
File "/opt/airflow/airflow/models/taskinstance.py", line 478, in
_execute_task
result = _execute_callable(context=context, **execute_callable_kwargs)
File "/opt/airflow/airflow/models/taskinstance.py", line 441, in
_execute_callable
return ExecutionCallableRunner(
File "/opt/airflow/airflow/utils/operator_helpers.py", line 250, in run
return self.func(*args, **kwargs)
File "/opt/airflow/airflow/models/baseoperator.py", line 405, in wrapper
return func(self, *args, **kwargs)
File "/opt/airflow/airflow/providers/amazon/aws/operators/eks.py", line
1103, in execute
return super().execute(context)
File "/opt/airflow/airflow/models/baseoperator.py", line 405, in wrapper
return func(self, *args, **kwargs)
File "/opt/airflow/airflow/providers/cncf/kubernetes/operators/pod.py",
line 578, in execute
return self.execute_sync(context)
File "/opt/airflow/airflow/providers/cncf/kubernetes/operators/pod.py",
line 586, in execute_sync
self.pod = self.get_or_create_pod( # must set `self.pod` for `on_kill`
File "/opt/airflow/airflow/providers/cncf/kubernetes/operators/pod.py",
line 542, in get_or_create_pod
pod = self.find_pod(self.namespace or
pod_request_obj.metadata.namespace, context=context)
File "/opt/airflow/airflow/providers/cncf/kubernetes/operators/pod.py",
line 524, in find_pod
pod_list = self.client.list_namespaced_pod(
File
"/usr/local/lib/python3.8/site-packages/kubernetes/client/api/core_v1_api.py",
line 15823, in list_namespaced_pod
return self.list_namespaced_pod_with_http_info(namespace, **kwargs) #
noqa: E501
File
"/usr/local/lib/python3.8/site-packages/kubernetes/client/api/core_v1_api.py",
line 15942, in list_namespaced_pod_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
373, in request
return self.rest_client.GET(url,
File "/usr/local/lib/python3.8/site-packages/kubernetes/client/rest.py",
line 244, in GET
return self.request("GET", url,
File "/usr/local/lib/python3.8/site-packages/kubernetes/client/rest.py",
line 238, in request
raise ApiException(http_resp=r)
kubernetes.client.exceptions.ApiException: (403)
Reason: Forbidden
HTTP response headers: HTTPHeaderDict({'Audit-Id':
'dede46b8-8f1d-496f-b005-5d49cf69f3a8', 'Cache-Control': 'no-cache, private',
'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff',
'X-Kubernetes-Pf-Flowschema-Uid': '70b99781-63dc-4f6a-8e55-475c91222bbc',
'X-Kubernetes-Pf-Prioritylevel-Uid': '64a41238-df95-49a3-b050-f3a551eb9d19',
'Date': 'Mon, 08 Apr 2024 18:12:50 GMT', 'Content-Length': '261'})
HTTP response body:
{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods
is forbidden: User \"system:anonymous\" cannot list resource \"pods\" in API
group \"\" in the namespace
\"default\"","reason":"Forbidden","details":{"kind":"pods"},"code":403}
```
I am afraid the bug impacts not only AWS system tests but also users. I will
create a PR to revert this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]