This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 14b075b4c9 openlineage: remove deprecated parentRun facet key (#40681)
14b075b4c9 is described below

commit 14b075b4c93fe44c20abbe19baa741c9906d2cc0
Author: Kacper Muda <[email protected]>
AuthorDate: Wed Jul 10 11:56:52 2024 +0200

    openlineage: remove deprecated parentRun facet key (#40681)
    
    Signed-off-by: Kacper Muda <[email protected]>
---
 airflow/providers/openlineage/plugins/adapter.py    |  7 +------
 tests/providers/openlineage/plugins/test_adapter.py | 12 ------------
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/airflow/providers/openlineage/plugins/adapter.py 
b/airflow/providers/openlineage/plugins/adapter.py
index c803094af1..9e2613d8db 100644
--- a/airflow/providers/openlineage/plugins/adapter.py
+++ b/airflow/providers/openlineage/plugins/adapter.py
@@ -434,12 +434,7 @@ class OpenLineageAdapter(LoggingMixin):
                 namespace=conf.namespace(),
                 name=parent_job_name or job_name,
             )
-            facets.update(
-                {
-                    "parent": parent_run_facet,
-                    "parentRun": parent_run_facet,  # Keep sending this for 
the backward compatibility
-                }
-            )
+            facets.update({"parent": parent_run_facet})
 
         if run_facets:
             facets.update(run_facets)
diff --git a/tests/providers/openlineage/plugins/test_adapter.py 
b/tests/providers/openlineage/plugins/test_adapter.py
index d548e03a91..e588b25dcc 100644
--- a/tests/providers/openlineage/plugins/test_adapter.py
+++ b/tests/providers/openlineage/plugins/test_adapter.py
@@ -243,10 +243,6 @@ def 
test_emit_start_event_with_additional_information(mock_stats_incr, mock_stat
                             run={"runId": "parent_run_id"},
                             job={"namespace": namespace(), "name": 
"parent_job_name"},
                         ),
-                        "parentRun": ParentRunFacet(
-                            run={"runId": "parent_run_id"},
-                            job={"namespace": namespace(), "name": 
"parent_job_name"},
-                        ),
                         "externalQuery1": 
ExternalQueryRunFacet(externalQueryId="123", source="source"),
                         "externalQuery2": 
ExternalQueryRunFacet(externalQueryId="999", source="source"),
                     },
@@ -361,10 +357,6 @@ def 
test_emit_complete_event_with_additional_information(mock_stats_incr, mock_s
                             run={"runId": "parent_run_id"},
                             job={"namespace": namespace(), "name": 
"parent_job_name"},
                         ),
-                        "parentRun": ParentRunFacet(
-                            run={"runId": "parent_run_id"},
-                            job={"namespace": namespace(), "name": 
"parent_job_name"},
-                        ),
                         "externalQuery": 
ExternalQueryRunFacet(externalQueryId="123", source="source"),
                     },
                 ),
@@ -472,10 +464,6 @@ def 
test_emit_failed_event_with_additional_information(mock_stats_incr, mock_sta
                             run={"runId": "parent_run_id"},
                             job={"namespace": namespace(), "name": 
"parent_job_name"},
                         ),
-                        "parentRun": ParentRunFacet(
-                            run={"runId": "parent_run_id"},
-                            job={"namespace": namespace(), "name": 
"parent_job_name"},
-                        ),
                         "externalQuery": 
ExternalQueryRunFacet(externalQueryId="123", source="source"),
                         "errorMessage": ErrorMessageRunFacet(
                             message="Error message", 
programmingLanguage="python", stackTrace=None

Reply via email to