You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/26 10:10:14 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #12249: Add DataflowJobMessagesSensor and DataflowAutoscalingEventsSensor

turbaszek commented on a change in pull request #12249:
URL: https://github.com/apache/airflow/pull/12249#discussion_r530915107



##########
File path: airflow/providers/google/cloud/hooks/dataflow.py
##########
@@ -264,6 +264,66 @@ def fetch_job_metrics_by_id(self, job_id: str) -> dict:
         self.log.debug("fetch_job_metrics_by_id %s:\n%s", job_id, result)
         return result
 
+    def _fetch_list_job_messages_responses(self, job_id: str) -> Generator[dict, None, None]:
+        """
+        Helper method to fetch ListJobMessagesResponse with the specified Job ID.
+
+        :param job_id: Job ID to get.
+        :type job_id: str
+        :return: yields the ListJobMessagesResponse. See:
+            https://cloud.google.com/dataflow/docs/reference/rest/v1b3/ListJobMessagesResponse
+        :rtype: Generator[dict, None, None]
+        """
+        request = (
+            self._dataflow.projects()
+            .locations()
+            .jobs()
+            .messages()
+            .list(projectId=self._project_number, location=self._job_location, jobId=job_id)
+        )

Review comment:
       Hm. Why pylint is not complaining about `no-member` as it does in all other places where we use discovery endpoints?




----------------------------------------------------------------
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:
users@infra.apache.org