diogosilva30 commented on PR #68078: URL: https://github.com/apache/airflow/pull/68078#issuecomment-4681055007
@jscheffl Good point. A common-compat bridge could actually fix 3.2.x retroactively, which this PR can't since there won't be another 3.2.x release. I'd still keep the init here though. Every long-running component (scheduler, triggerer, dag-processor, executors, task-runner) already calls `Stats.initialize(...)` itself, so the API server was just missing from that list and this brings it in line. Doing it in common-compat would mean the provider reaching into core internals for the factory and legacy_names_on config to set the singleton up correctly, which adds coupling I'd rather avoid. The lifespan init also covers consumers that don't go through compat at all, like the `HttpMetricsMiddleware` in #64523 that uses the `Stats` singleton directly. So I see them as complementary. This is the clean fix going forward, and if we want to help existing 3.2.x users I'm happy to open a follow-up for a targeted common-compat change. -- 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]
