Add proxy support to Databricks connections#68527
Open
Vamsi-klu wants to merge 1 commit into
Open
Conversation
2f13e67 to
fdd7d60
Compare
fdd7d60 to
cdfb613
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add explicit proxy support for Databricks connections.
What changed
This adds a documented
proxiesconnection extra for the Databricks provider. The extra is intentionally allowlisted and only acceptshttpandhttpskeys, for example:{ "proxies": { "http": "http://proxy.example.com:8080", "https": "http://proxy.example.com:8443" } }The configured proxy is applied to:
Why
Users running Airflow behind a corporate proxy could not authenticate to Azure Databricks because token acquisition to Azure/Databricks endpoints did not receive proxy configuration.
This fixes #32576 while keeping connection extras explicit and safe. The implementation does not pass arbitrary connection extras through to client libraries; it validates and forwards only the reviewed
proxiesextra.Testing
I added coverage for:
proxiesparsing from Databricks connection extrasaiohttpproxyproxiesCommands run:
uv run ruff format providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py providers/databricks/tests/unit/databricks/hooks/test_databricks.py providers/databricks/tests/unit/databricks/hooks/test_databricks_base.pyuv run ruff check --fix providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py providers/databricks/tests/unit/databricks/hooks/test_databricks.py providers/databricks/tests/unit/databricks/hooks/test_databricks_base.pyuv run ruff format providers/databricks/tests/unit/databricks/hooks/test_databricks_sql.pyuv run ruff check --fix providers/databricks/tests/unit/databricks/hooks/test_databricks_sql.pyuv run ./scripts/ci/prek/check_new_airflow_exception_usage.py providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.pyuv run --project providers/databricks pytest providers/databricks/tests/unit/databricks/hooks/test_databricks_base.py providers/databricks/tests/unit/databricks/hooks/test_databricks.py providers/databricks/tests/unit/databricks/hooks/test_databricks_sql.py -qResult:
284 passed; AirflowException usage check passed.closes: #32576
Was generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-5) following the guidelines
Drafted-by: Codex (GPT-5) (no human review before posting)