uranusjr commented on code in PR #37736:
URL: https://github.com/apache/airflow/pull/37736#discussion_r1512992579


##########
airflow/providers/google/cloud/operators/bigquery.py:
##########
@@ -2768,11 +2772,27 @@ def prepare_template(self) -> None:
             with open(self.configuration) as file:
                 self.configuration = json.loads(file.read())
 
+    def _add_job_labels(self) -> None:
+        dag_label = self.dag_id.lower()
+        task_label = self.task_id.lower()
+
+        if len(dag_label) <= LABEL_SIZE_LIMIT and len(task_label) <= 
LABEL_SIZE_LIMIT:
+            if LABEL_REGEX.match(dag_label) and LABEL_REGEX.match(task_label):

Review Comment:
   You can merge these checks with `^[a-z][\w-]{0,63}$`



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

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to