GitHub user timkpaine created a discussion: How does a plugin/extension/dag get a local client without authenticating?
Let's imagine i want to call `Pool.create_or_update_pool` in my DAG. This no longer works in Airflow 3 due to no direct DB access. So instead I'd like to interact with the API via REST using the python client or `airflow-ctl`. But inside my DAG/plugin, I don't have a username / password or anything with which to interact with the API server. E.g. if the code is running inside my dag processor process, it really shouldn't need to authenticate as some random user. The scheduler and workers also presumably need to interact with the api server as well, is there some method to get API access when the code itself is running as part of a "trusted" process (e.g. in the dag processor, scheduler, worker, etc)? It seems like [the local client](https://github.com/apache/airflow/blob/1533ecf96d314d8e17501d2189abf4245283abd8/airflow-core/src/airflow/api/client/__init__.py#L25) was working in this direction, but this just invokes the same Pool code that relies on direct DB access under the hood. GitHub link: https://github.com/apache/airflow/discussions/61800 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
