Uh oh!
There was an error while loading. Please reload this page.
Add async connection testing via workers for security isolation - #62343
Conversation
39ba192 to
3efcd26CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
anishgirianish
commented
Feb 23, 2026
@jason810496 Thanks for the thorough review! Addressed your feedback in the latest push:
Could you please take another look when you get a chance? Thanks! |
33392ec to
59d2c88CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kaxil
left a comment
There was a problem hiding this comment.
Approving so this can move, but a few things to follow up on:
Newsfragment missing. New config option, new lifecycle, security-model changes -- this needs
airflow-core/newsfragments/62343.feature.rst(or.significant.rst). Best done before merge.User docs. Only
migrations-ref.rstis touched. The POST + poll lifecycle, the[core] connection_test_max_concurrencyknob, the worker token +ct:selfscope model, and multi-team behavior all need a narrative page underairflow-core/docs/. Follow-up is fine.Logging + metrics. Reaper warnings drop team / state / connection_id context. Supervisor doesn't log start, duration, or timeout-driven cleanup, and there's no
bind_contextvarsso concurrent tests in one worker can't be grepped apart. NoStats.timing/Stats.gaugefor queue depth, dispatch latency, success/failure rate, or hook execution time. Operators will have nothing to look at when this misbehaves.ct:selfscope is untested.mock_require_authinairflow-core/tests/unit/api_fastapi/execution_api/conftest.pyreadstask_instance_idfrom path params, but the new connection-test routes useconnection_test_id. So the mock always returnsTIToken(id="00000000-...")and thect:selfcheck insecurity.py(str(token.id) != ct_self_id-> 403) never executes in tests. Same shape as theti:selfgap on #66073. Fix: either extend the mock to also readconnection_test_id, or add one test that bypassesdependency_overrides[require_auth]and asserts 403 on a token/path mismatch.
Items 2-4 can land as follow-ups. Item 1 ideally lands here.
Vamsi-klu
commented
May 30, 2026
I found two blockers in the current head:
Drafted-by: Codex (GPT-5); reviewed by @Vamsi-klu before posting |
anishgirianish
commented
May 30, 2026
Hi @Vamsi-klu thank you so much for your review.
I think this clears the blockers. Thank you |
ferruzzi
left a comment
There was a problem hiding this comment.
Looks like all concerns are addressed. Approving and merging. Thanks for sticking this one out, it was a major redesign.
Was generative AI tooling used to co-author this PR?
Summary
Follows the direction proposed by @potiuk in #59643 to move connection testing off the API server and onto workers.
Connection testing has been disabled by default since Airflow 2.7.0 because executing user-supplied driver code (ODBC/JDBC) on the API server poses security risks, and workers typically have network access to external systems that API servers don't.
This moves the whole thing onto workers. A dedicated
TestConnectionworkload goes through the scheduler, gets dispatched to a supporting executor, and the worker runs test_connection()` with a proper timeout. Results come back through the Execution API. Design was discussed on dev@ : "[DISCUSS] Move connection testing to workers" (Feb 2026).Demo
breeze-e2e-rundown-compressed.mp4
Overview
ExecuteCallback, so connection tests never compete with correctness-critical callbacksmax_connection_test_concurrency(default 4). A reaper catches stuck tests after timeout + grace periodsignal.alarmenforcement in LocalExecutor, results reported back via Execution APIqueuefield on the API, wired through to scheduler dispatch.supports_connection_testflag on BaseExecutor, immediate FAILED if no executor supports itConfig
[connection_test] timeout: worker timeout, default 60s[connection_test] max_concurrency: dispatch budget, default 4[connection_test] reaper_interval: reaper frequency, default 30sNot in this PR
References
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.