[GitHub] [airflow] bryanyang0528 edited a comment on issue #5067: [AIRFLOW-4265] Lineage backend did not work normally

2019-04-10 Thread GitBox
bryanyang0528 edited a comment on issue #5067: [AIRFLOW-4265] Lineage backend 
did not work normally
URL: https://github.com/apache/airflow/pull/5067#issuecomment-481934288
 
 
   @NielsZeilemaker 
   Could I initiate the backend in the `_get_backend()` function and return a 
backend instance?
   
https://github.com/bryanyang0528/airflow/blob/d87fb873cdc27350324fd814bb97488dba1f126b/airflow/lineage/__init__.py#L45
   
   Or turn the interface/super class of the AtlasBackend in a staticmethod? 
Because `send_lineage` didn't use `self` as a parameter and refer to any 
resource in the class.
   
   @feng-tao Do you have any opinion or suggestion?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [airflow] bryanyang0528 edited a comment on issue #5067: [AIRFLOW-4265] Lineage backend did not work normally

2019-04-10 Thread GitBox
bryanyang0528 edited a comment on issue #5067: [AIRFLOW-4265] Lineage backend 
did not work normally
URL: https://github.com/apache/airflow/pull/5067#issuecomment-481934288
 
 
   @NielsZeilemaker 
   Could I initiate the backend in the `_get_backend()` function and return a 
backend instance?
   
https://github.com/bryanyang0528/airflow/blob/d87fb873cdc27350324fd814bb97488dba1f126b/airflow/lineage/__init__.py#L45
   
   @feng-tao Do you have any opinion or suggestion?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [airflow] bryanyang0528 edited a comment on issue #5067: [AIRFLOW-4265] Lineage backend did not work normally

2019-04-08 Thread GitBox
bryanyang0528 edited a comment on issue #5067: [AIRFLOW-4265] Lineage backend 
did not work normally
URL: https://github.com/apache/airflow/pull/5067#issuecomment-481083240
 
 
   import_string will fail if backend = `airflow.lineage.backend.atlas`
   
   ```
   >>> from airflow.utils.module_loading import import_string
   /airflow/airflow/configuration.py:557: DeprecationWarning: Specifying 
airflow_home in the config file is deprecated. As you have left it at the 
default value you should remove the setting from your airflow.cfg and suffer no 
change in behaviour.
 category=DeprecationWarning,
   >>> backend = import_string('airflow.lineage.backend.atlas')
   Traceback (most recent call last):
 File "/airflow/airflow/utils/module_loading.py", line 36, in import_string
   return getattr(module, class_name)
   AttributeError: module 'airflow.lineage.backend' has no attribute 'atlas'
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
 File "", line 1, in 
 File "/airflow/airflow/utils/module_loading.py", line 39, in import_string
   module_path, class_name)
   ImportError: Module "airflow.lineage.backend" does not define a "atlas" 
attribute/class
   >>>
   ```
   
   if backend = `airflow.lineage.backend.atlas.AtlasBackend`, it passed 
import_string, but backend is a class, can not call send_message directly.
   ```
   >>> backend = import_string('airflow.lineage.backend.atlas.AtlasBackend')
   >>> backend
   
   >>> backend.send_lineage(operator='', inlets='', outlets='', context='')
   Traceback (most recent call last):
 File "", line 1, in 
   TypeError: send_lineage() missing 1 required positional argument: 'self'
   >>>
   ```


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:
us...@infra.apache.org


With regards,
Apache Git Services