ANiteckiP commented on a change in pull request #7613: [AIRFLOW-6978] Add 
PubSubPullOperator
URL: https://github.com/apache/airflow/pull/7613#discussion_r388363326
 
 

 ##########
 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:
   I think we should allow passing an empty list, because the `pull` method can 
return an empty list as well - `acknowledge` should be able to gracefully 
accept any valid `pull` return value. We could check for empty list and return 
early, or just pass the list to the underlying API and expose its behaviour 
without additional checks (as it is now).

----------------------------------------------------------------
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

Reply via email to