-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix(docs): respect no_proxy environment variable #23816
Conversation
The `clickhouse-connect` library `0.4.1` did not handle a `no_proxy` environment variable. This is eventually problematic when using the [Docker Compose Installation Guide](https://superset.apache.org/docs/installation/installing-superset-using-docker-compose) in an environment that requires a forward proxy and where Clickhouse should be used as a database. In such case the call to the database should remain inside the docker network to allow addressing the database via its container name. Calls to external data sources should be rerouted via the forward proxy. Version `0.4.1` handles all connections via the proxy and thus misses the local network connection inside docker network and thus eventually fails host name resolution, given the forward proxy sits outside the docker network and is not aware of the inside docker network container names.
Big thanks to @genzgd for all the hard work to respect the |
I'd recommend using 0.5.20 as the minimum, since it has a somewhat important bug fix concerning HTTP headers. |
Also big thanks for adding the this PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per suggestion here: apache#23816 (comment)
@genzgd, updated to ´0.5.20´ as suggested. |
Just a heads up, at this point the current version is 0.6.8 and 0.6.x is required for Superset 2.1.+ |
As per feedback from clickhouse-connect developer...
@michael-s-molina, anything missing to merge this to master? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I was just waiting for CI to complete 😄 Thank you for the fix @karsten-wagner and for the awesome PR description! |
Thanks and welcome! Superset is a great tool! |
(cherry picked from commit a80ec15)
SUMMARY
The
clickhouse-connect
library0.4.1
did not handle ano_proxy
environment variable. This is eventually problematic when using the Docker Compose Installation Guide in an environment that requires a forward proxy (e.g., in an enterprise environment) and where Clickhouse should be used as a database. In such case the call to the database should remain inside the docker network to allow addressing the database via its container name. Calls to external data sources should be rerouted via the forward proxy. Version0.4.1
handles all connections via the proxy and thus misses the local network connection inside docker network and thus eventually fails host name resolution, given the forward proxy sits outside the docker network and is not aware of the inside docker network container names.The issue has been fixed in the
clickhouse-connect
library in version0.5.19
via #PR163, hence bumping version here in the superset docs accordingly.TESTING INSTRUCTIONS
0.4.1
clickhouse
todocker-compose-non-dev.yml
, e.g.:docker/.env
to containhttp_proxy
,https_proxy
andno_proxy
environment variables, e.g.:clickhousedb://clickhouse/default
The connection will fail. See eventually logs in the ´superset_app` container. Superset UI shows an error message on the dialog with the connection string, but not on the one where you provide host, port etc. in separate fields.
docker/requirements-local.txt
to contain new versionclickhouse-connect>=0.5.19
ADDITIONAL INFORMATION