-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ingestion/airflow-plugin): fixed failing testcases
- Loading branch information
1 parent
3c54df1
commit 6bdfce7
Showing
3 changed files
with
423 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
from datetime import timedelta, datetime | ||
|
||
from airflow import DAG | ||
from custom_operator import CustomOperator | ||
|
||
default_args = { | ||
"owner": "airflow", | ||
"depends_on_past": False, | ||
"start_date": datetime(2023, 1, 1), | ||
"email": ["[email protected]"], | ||
"email_on_failure": False, | ||
"execution_timeout": timedelta(minutes=5), | ||
} | ||
|
||
|
||
|
@@ -15,4 +22,8 @@ | |
catchup=False, | ||
default_view="tree", | ||
) as dag: | ||
custom_task = CustomOperator(task_id="custom_task_id", name="custom_name") | ||
custom_task = CustomOperator( | ||
task_id="custom_task_id", | ||
name="custom_name", | ||
dag=dag, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,16 +119,17 @@ | |
"json": { | ||
"customProperties": { | ||
"depends_on_past": "False", | ||
"email": "None", | ||
"email": "['[email protected]']", | ||
"label": "'custom_task_id'", | ||
"execution_timeout": "None", | ||
"execution_timeout": "datetime.timedelta(seconds=300)", | ||
"sla": "None", | ||
"task_id": "'custom_task_id'", | ||
"trigger_rule": "<TriggerRule.ALL_SUCCESS: 'all_success'>", | ||
"wait_for_downstream": "False", | ||
"downstream_task_ids": "[]", | ||
"inlets": "[]", | ||
"outlets": "[]" | ||
"outlets": "[]", | ||
"openlineage_run_facet_unknownSourceAttribute": "{\"_producer\": \"https://github.com/OpenLineage/OpenLineage/tree/1.18.0/integration/airflow\", \"_schemaURL\": \"https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/BaseFacet\", \"unknownItems\": [{\"name\": \"CustomOperator\", \"properties\": {\"depends_on_past\": false, \"downstream_task_ids\": \"[]\", \"execution_timeout\": \"<<non-serializable: timedelta>>\", \"executor_config\": {}, \"ignore_first_depends_on_past\": true, \"is_setup\": false, \"is_teardown\": false, \"mapped\": false, \"operator_class\": \"custom_operator.CustomOperator\", \"owner\": \"airflow\", \"priority_weight\": 1, \"queue\": \"default\", \"retries\": 0, \"retry_exponential_backoff\": false, \"task_id\": \"custom_task_id\", \"trigger_rule\": \"all_success\", \"upstream_task_ids\": \"[]\", \"wait_for_downstream\": false, \"wait_for_past_depends_before_skipping\": false, \"weight_rule\": \"downstream\"}, \"type\": \"operator\"}]}" | ||
}, | ||
"externalUrl": "http://airflow.example.com/taskinstance/list/?flt1_dag_id_equals=custom_operator_dag&_flt_3_task_id=custom_task_id", | ||
"name": "custom_task_id", | ||
|
@@ -261,17 +262,17 @@ | |
"json": { | ||
"customProperties": { | ||
"depends_on_past": "False", | ||
"email": "None", | ||
"email": "['[email protected]']", | ||
"label": "'custom_task_id'", | ||
"execution_timeout": "None", | ||
"execution_timeout": "datetime.timedelta(seconds=300)", | ||
"sla": "None", | ||
"task_id": "'custom_task_id'", | ||
"trigger_rule": "<TriggerRule.ALL_SUCCESS: 'all_success'>", | ||
"wait_for_downstream": "False", | ||
"downstream_task_ids": "[]", | ||
"inlets": "[Dataset(platform='snowflake', name='mydb.schema.tableA', env='PROD', platform_instance=None), Dataset(platform='snowflake', name='mydb.schema.tableB', env='PROD', platform_instance=None)]", | ||
"outlets": "[Dataset(platform='snowflake', name='mydb.schema.tableD', env='PROD', platform_instance=None)]", | ||
"openlineage_run_facet_unknownSourceAttribute": "{\"_producer\": \"https://github.com/apache/airflow/tree/providers-openlineage/1.9.1\", \"_schemaURL\": \"https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/BaseFacet\", \"unknownItems\": [{\"name\": \"CustomOperator\", \"properties\": {\"depends_on_past\": false, \"downstream_task_ids\": \"[]\", \"executor_config\": {}, \"ignore_first_depends_on_past\": true, \"is_setup\": false, \"is_teardown\": false, \"mapped\": false, \"operator_class\": \"custom_operator.CustomOperator\", \"owner\": \"airflow\", \"priority_weight\": 1, \"queue\": \"default\", \"retries\": 0, \"retry_exponential_backoff\": false, \"task_id\": \"custom_task_id\", \"trigger_rule\": \"all_success\", \"upstream_task_ids\": \"[]\", \"wait_for_downstream\": false, \"wait_for_past_depends_before_skipping\": false, \"weight_rule\": \"downstream\"}, \"type\": \"operator\"}]}" | ||
"openlineage_run_facet_unknownSourceAttribute": "{\"_producer\": \"https://github.com/OpenLineage/OpenLineage/tree/1.18.0/integration/airflow\", \"_schemaURL\": \"https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/BaseFacet\", \"unknownItems\": [{\"name\": \"CustomOperator\", \"properties\": {\"depends_on_past\": false, \"downstream_task_ids\": \"[]\", \"execution_timeout\": \"<<non-serializable: timedelta>>\", \"executor_config\": {}, \"ignore_first_depends_on_past\": true, \"is_setup\": false, \"is_teardown\": false, \"mapped\": false, \"operator_class\": \"custom_operator.CustomOperator\", \"owner\": \"airflow\", \"priority_weight\": 1, \"queue\": \"default\", \"retries\": 0, \"retry_exponential_backoff\": false, \"task_id\": \"custom_task_id\", \"trigger_rule\": \"all_success\", \"upstream_task_ids\": \"[]\", \"wait_for_downstream\": false, \"wait_for_past_depends_before_skipping\": false, \"weight_rule\": \"downstream\"}, \"type\": \"operator\"}]}" | ||
}, | ||
"externalUrl": "http://airflow.example.com/taskinstance/list/?flt1_dag_id_equals=custom_operator_dag&_flt_3_task_id=custom_task_id", | ||
"name": "custom_task_id", | ||
|
Oops, something went wrong.