potiuk commented on a change in pull request #7613: [AIRFLOW-6978] Add
PubSubPullOperator
URL: https://github.com/apache/airflow/pull/7613#discussion_r387645733
##########
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:
What if ack_ids is [] ? Should we allow this case or should it be treated as
None? I have slight preference to treat is as None (the code will be simpler
(without is not None) and we prevent the user from making the mistake of empty
id list.
----------------------------------------------------------------
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