avolant commented on PR #62184:
URL: https://github.com/apache/airflow/pull/62184#issuecomment-4088608162

   Friendly bump — this PR has been open for about a month without reviews. 🙂
   
   **TL;DR**: +41/−5 in a single file (`settings.py`), zero behavioral change 
when no override is provided.
   
   The change extracts `create_engine()` / `create_async_engine()` calls into 
two overridable module-level functions (`create_metadata_engine` / 
`create_async_metadata_engine`), following the same `airflow_local_settings.py` 
override pattern as `task_policy` / `dag_policy`.
   
   **Why this is needed**: deployments that use short-lived credentials (JWT, 
IAM tokens) need to register a SQLAlchemy `do_connect` event listener on the 
metadata engine. Today there's no way to do that without patching `settings.py` 
at build time. The existing config options don't cover this:
   
   - `sql_alchemy_conn_cmd` — runs once at startup; tokens expire after pool 
recycle
   - `sql_alchemy_connect_args` — static dict, not a per-connection callback
   
   A companion PR exists on the Celery side for the same use case: 
[celery/celery#10135](https://github.com/celery/celery/pull/10135).
   
   We're running this in Datadog via a build-time patch and would love to drop 
it in favor of the upstream hook. Happy to address any feedback.
   
   coucou @hussein-awala, @potiuk 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to