-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP_PROXY settings do not recognize Worker Pods within NO_PROXY CIDR range #39794
Closed
2 tasks done
Labels
affected_version:2.9
Issues Reported for 2.9
area:logging
good first issue
kind:bug
This is a clearly a bug
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
Feel free raise a PR |
eladkal
pushed a commit
to softyoungha/airflow
that referenced
this issue
Jun 9, 2024
- httpx does not support CIDRs in NO_PROXY - simply, convert httpx to requests, issues done - related issue: apache#39794
potiuk
pushed a commit
that referenced
this issue
Jun 15, 2024
* Change httpx to requests in file_task_handler - httpx does not support CIDRs in NO_PROXY - simply, convert httpx to requests, issues done - related issue: #39794 * Add cidr no_proxy test test_log_handlers.py * Apply monkeypatch fixture --------- Co-authored-by: scott-py <[email protected]>
utkarsharma2
pushed a commit
that referenced
this issue
Jul 2, 2024
* Change httpx to requests in file_task_handler - httpx does not support CIDRs in NO_PROXY - simply, convert httpx to requests, issues done - related issue: #39794 * Add cidr no_proxy test test_log_handlers.py * Apply monkeypatch fixture --------- Co-authored-by: scott-py <[email protected]> (cherry picked from commit 1ddadf5)
35 tasks
romsharon98
pushed a commit
to romsharon98/airflow
that referenced
this issue
Jul 26, 2024
* Change httpx to requests in file_task_handler - httpx does not support CIDRs in NO_PROXY - simply, convert httpx to requests, issues done - related issue: apache#39794 * Add cidr no_proxy test test_log_handlers.py * Apply monkeypatch fixture --------- Co-authored-by: scott-py <[email protected]>
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this issue
Sep 20, 2024
* Change httpx to requests in file_task_handler - httpx does not support CIDRs in NO_PROXY - simply, convert httpx to requests, issues done - related issue: apache/airflow#39794 * Add cidr no_proxy test test_log_handlers.py * Apply monkeypatch fixture --------- Co-authored-by: scott-py <[email protected]> (cherry picked from commit 1ddadf59b8089f71d3c0f153aa62112d073039fc) GitOrigin-RevId: 81dd4230328524aa5546a2dc42c28b65486fd094
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this issue
Nov 9, 2024
* Change httpx to requests in file_task_handler - httpx does not support CIDRs in NO_PROXY - simply, convert httpx to requests, issues done - related issue: apache/airflow#39794 * Add cidr no_proxy test test_log_handlers.py * Apply monkeypatch fixture --------- Co-authored-by: scott-py <[email protected]> GitOrigin-RevId: 1ddadf59b8089f71d3c0f153aa62112d073039fc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affected_version:2.9
Issues Reported for 2.9
area:logging
good first issue
kind:bug
This is a clearly a bug
Official Helm Chart version
1.13.1 (latest released)
Apache Airflow version
2.9.1
Kubernetes Version
1.26.4
Helm Chart configuration
It think there is no related Helm chart configuration.
Docker Image customizations
I am currently using HTTP proxy and NO_PROXY settings.
What happened
Airflow webserver is unable to retrieve logs from the worker pods.
403 Forbidden is an error response caused by sending the request through the proxy.
What you think should happen instead
Because the worker pod's address is included in the NO_PROXY CIDR
10.0.0.0/8
, requests to the worker pod should not go through the proxy. However, requests are still being sent to the proxy.This behavior is due to
httpx
not supporting the CIDR range in the NO_PROXY settings.airflow/airflow/utils/log/file_task_handler.py
Lines 87 to 105 in 482c0be
Since
requests
supports NO_PROXY CIDR, simply changing the httpx part to requests in the function works well.How to reproduce
When a URL is directly input for testing in
airflow.utils.log.file_task_handler._fetch_logs_from_service
, it can be observed that the request bypasses the NO_PROXY's CIDR and utilizes the proxy insteadAnything else
After wondering why this was happening, it appears that the URLPattern matching logic in httpx does not take CIDR into account.
Below is an example code:
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: