GitHub user keemgdeok added a comment to the discussion: Airflow worker pod not 
able to fetch connections information during its execution

Your September update makes an environment proxy worth checking: curl succeeds, 
the SDK receives a bare `HTTP/1.0 503`, and the API server has no matching 
request log.

In [Airflow 
3.1.8](https://github.com/apache/airflow/blob/3.1.8/task-sdk/src/airflow/sdk/api/client.py),
 the execution client inherits from HTTPX without disabling its environment 
settings. [HTTPX uses proxy environment variables by 
default](https://www.python-httpx.org/environment_variables/), so a successful 
curl request doesn't establish that the SDK took the same route.

>From the **same task container**, compare these unauthenticated reads:

```python
import httpx

url = "http://airflow-api-service:8080/execution/connections/aws_default";
for use_env in (True, False):
    with httpx.Client(trust_env=use_env, timeout=10) as client:
        print(use_env, client.get(url).status_code)
```

If the default path gives 503 while the direct path reaches Airflow and gives 
401/403, check `HTTP_PROXY`, `ALL_PROXY` and `NO_PROXY` in the task Pod's 
environment. Add the exact API Service hostname to the existing proxy exclusion 
list if it is missing, then retry a fresh task Pod. This would explain the 
discrepancy; it isn't a confirmed diagnosis. If both paths behave the same, 
this check hasn't isolated the cause.


GitHub link: 
https://github.com/apache/airflow/discussions/69733#discussioncomment-18737219

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to