jedcunningham commented on code in PR #34349:
URL: https://github.com/apache/airflow/pull/34349#discussion_r1348236376


##########
airflow/auth/managers/base_auth_manager.py:
##########
@@ -50,6 +50,10 @@ def get_cli_commands() -> list[CLICommand]:
         """
         return []
 
+    def get_api_blueprint(self) -> None | Blueprint:

Review Comment:
   So, mixed news I'd say. There must be a nuance I'm missing here, but I'll 
try to brain dump what I've found.
   
   There is a provision for a provider to expose a plugin (yay!), but at least 
for me, it doesn't seem to work unless I disable lazy loading of plugins and 
providers (boo!). The whole "plugins from providers" thing seems broken to me 
with the lazy load aspect of it.
   
   I see both the hive and OL provider trying to do this (e.g. OL does it 
[here](https://github.com/apache/airflow/blob/59ed537fb10095176ae5bf70a19b7b48ab0850cf/airflow/providers/openlineage/provider.yaml#L44-L46)
 and 
[here](https://github.com/apache/airflow/blob/59ed537fb10095176ae5bf70a19b7b48ab0850cf/airflow/providers/openlineage/plugins/openlineage.py#L40-L51)).
 OL takes the "always register the plugin, but sometimes it'll be empty 
approach". I think that's okay, but I'd rather not register it in the first 
place if we don't need it.
   
   Doing it conditionally via the entry point does work, but it understandably 
does throw an error message when its not there. Empty plugin is one answer. 
`MyPlugin = None` also worked, but my didn't like it haha.
   
   Another option that might make sense is to just let the configured auth 
manager optionally register a plugin by adding another path 
[here](https://github.com/apache/airflow/blob/59ed537fb10095176ae5bf70a19b7b48ab0850cf/airflow/plugins_manager.py#L332-L336),
 like `load_auth_manager_plugin` or something.
   
   Hopefully this gives you a few nudges to get rolling again on this.



-- 
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