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,gcs: use proper name for openlineage methods #32956

Merged
merged 1 commit into from
Jul 31, 2023
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
2 changes: 1 addition & 1 deletion airflow/providers/google/cloud/transfers/gcs_to_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ def _copy_single_object(self, hook, source_object, destination_object):
if self.move_object:
hook.delete(self.source_bucket, source_object)

def get_openlineage_events_on_complete(self, task_instance):
def get_openlineage_facets_on_complete(self, task_instance):
"""
Implementing _on_complete because execute method does preprocessing on internals.
This means we won't have to normalize self.source_object and self.source_objects,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Here's example of properly implemented ``get_openlineage_facets_on_complete`` me

.. code-block::

def get_openlineage_events_on_complete(self, task_instance):
def get_openlineage_facets_on_complete(self, task_instance):
"""
Implementing _on_complete because execute method does preprocessing on internals.
This means we won't have to normalize self.source_object and self.source_objects,
Expand Down
6 changes: 3 additions & 3 deletions tests/providers/google/cloud/transfers/test_gcs_to_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def test_execute_simple_reports_openlineage(self, mock_hook):

operator.execute(None)

lineage = operator.get_openlineage_events_on_complete(None)
lineage = operator.get_openlineage_facets_on_complete(None)
assert len(lineage.inputs) == 1
assert len(lineage.outputs) == 1
assert lineage.inputs[0] == Dataset(
Expand All @@ -862,7 +862,7 @@ def test_execute_multiple_reports_openlineage(self, mock_hook):

operator.execute(None)

lineage = operator.get_openlineage_events_on_complete(None)
lineage = operator.get_openlineage_facets_on_complete(None)
assert len(lineage.inputs) == 3
assert len(lineage.outputs) == 1
assert lineage.inputs == [
Expand All @@ -889,7 +889,7 @@ def test_execute_wildcard_reports_openlineage(self, mock_hook):

operator.execute(None)

lineage = operator.get_openlineage_events_on_complete(None)
lineage = operator.get_openlineage_facets_on_complete(None)
assert len(lineage.inputs) == 2
assert len(lineage.outputs) == 2
assert lineage.inputs == [
Expand Down