Skip to content

Commit

Permalink
openlineage: remove deprecated parentRun facet key (#40681)
Browse files Browse the repository at this point in the history
Signed-off-by: Kacper Muda <[email protected]>
  • Loading branch information
kacpermuda authored Jul 10, 2024
1 parent 22ec726 commit 14b075b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
7 changes: 1 addition & 6 deletions airflow/providers/openlineage/plugins/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,7 @@ def _build_run(
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)
Expand Down
12 changes: 0 additions & 12 deletions tests/providers/openlineage/plugins/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
},
Expand Down Expand Up @@ -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"),
},
),
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 14b075b

Please sign in to comment.