Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openlineage: remove deprecated parentRun facet key #40681

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading