amoghrajesh commented on issue #60404: URL: https://github.com/apache/airflow/issues/60404#issuecomment-3895153584
> Or another approach, similar to how we introduced a cli section in the provider metadata: [#59805](https://github.com/apache/airflow/pull/59805) > > We could separate the UI metadata into a new, clean module. > > For example, if you search for `cli/definition.py`, that’s where all the provider‑level CLI definitions live. Then we could still use the existing ProviderManager approach (loading objects via `importlib.metadata`). For community providers, we could add a `prek` to avoid importing heavy modules in the new UI metadata module, as shown here: https://github.com/apache/airflow/pull/59805/changes#diff-832133982e269231a55df6a2e72b5ac560f7b828b38b3cff2b904c0d96405ab1R145 > > Which _should_ significantly reduce the loading time as we just import some dicts via ProviderManager. Maybe, yes, but trying to have a _declarative_ way instead. This would require loading python code provided by users, which could also pose a security risk for example. As of today, nothing can stop a user from writing some malicious code in `get_ui_field_behaviour` -- 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]
