ANiteckiP commented on a change in pull request #7613: [AIRFLOW-6978] Add
PubSubPullOperator
URL: https://github.com/apache/airflow/pull/7613#discussion_r388240353
##########
File path: airflow/providers/google/cloud/hooks/pubsub.py
##########
@@ -545,8 +549,20 @@ def acknowledge(
:param metadata: (Optional) Additional metadata that is provided to
the method.
:type metadata: Sequence[Tuple[str, str]]]
"""
+
if not project_id:
raise ValueError("Project ID should be set.")
+
+ if ack_ids is not None and messages is None:
Review comment:
The idea is that passing both of those arguments in function call is
prohibited. Defaulting to empty list/tuple and using non-emptiness check rather
than `is not None` would miss cases when users pass both arguments, one of
which happens to be an empty collection, when they are not supposed to do that
in the first place.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services