mik-laj commented on a change in pull request #7138: [AIRFLOW-5912] Expose 
lineage API
URL: https://github.com/apache/airflow/pull/7138#discussion_r368198224
 
 

 ##########
 File path: airflow/api/client/api_client.py
 ##########
 @@ -70,3 +70,12 @@ def delete_pool(self, name):
         :param name: pool name
         """
         raise NotImplementedError()
+
+    def get_lineage(self, dag_id: str, execution_date: str):
 
 Review comment:
   In my opinion, this class is not intended for external use. Someone can use 
it, but it requires Airflow installation. I think it would be better if we 
recommend using the REST API directly. This is described in detail in the 
documentation - 
[here](https://airflow.readthedocs.io/en/latest/usage-cli.html#set-up-connection-to-a-remote-airflow-instance)
 For me, this is an internal abstraction that allows us to execute some CLI 
commands using the REST API or execute some CLI command using a direct database 
query.  So if we add a method here, then we should also add the corresponding 
command in CLI. We should not allow developer to use this class directly 
because we have a lot of side effects when importing the `airflow` package e.g. 
changing the logging configuration or importing the webserver classes.
   
   We cannot deprecate local_client because only the CLI that uses local_client 
is fully functional and we use this class in the default configuration. 
   
   The bit confusing is that this code is in the `api` package and not in the 
`cli` package, but the `cli` package was created later and it is possible that 
we should move this code now.
   
   I would like to deal with the subject of API in the near future. I've 
planned it in Q1. I will present AIP in the near future.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to