kacpermuda commented on code in PR #75303:
URL: https://github.com/apache/airflow/pull/75303#discussion_r4377697929
##########
providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:
##########
@@ -430,6 +458,7 @@ def get_task_parent_run_facet(
root_parent_run_id=root_parent_run_id,
root_parent_job_namespace=root_parent_job_namespace,
root_parent_job_name=root_parent_job_name,
+ root_parent_job_type=root_parent_job_type,
Review Comment:
Not deliberate in the end, so I’ve added it: task event parent facets now
carry DAG (and the root too when it is the Dag itself). SQL child events now
carry TASK for the parent and the root type from lineage_root_job_type. Covered
in unit tests and the e2e expected events.
##########
providers/standard/tests/unit/standard/utils/test_openlineage.py:
##########
@@ -137,18 +156,39 @@ def _mock_version(package):
mock_root_run_id.assert_called_once_with(ti)
mock_root_job_name.assert_called_once_with(ti)
mock_root_job_namespace.assert_called_once_with(ti)
+ mock_job_type.assert_called_once_with()
+ mock_root_job_type.assert_called_once_with(ti)
- # Verify result structure
- assert isinstance(result, dict)
assert result == expected_values
- assert set(result.keys()) == {
- "parentRunId",
- "parentJobName",
- "parentJobNamespace",
- "rootParentRunId",
- "rootParentJobName",
- "rootParentJobNamespace",
- }
+
+
+def test_get_openlineage_parent_info_without_job_type_macros(monkeypatch):
Review Comment:
Done: the two macro tests now use @patch(..., autospec=True) decorators.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]