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/10/26 16:12:46 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #11857: BigQuery job_id fix for `BigQueryInsertJobOperator`

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



##########
File path: airflow/providers/google/cloud/operators/bigquery.py
##########
@@ -2062,7 +2062,7 @@ def _job_id(self, context):
 
         exec_date = context['execution_date'].isoformat()
         job_id = f"airflow_{self.dag_id}_{self.task_id}_{exec_date}_{uniqueness_suffix}"
-        return re.sub(r"\:|-|\+\.", "_", job_id)
+        return re.sub(r"[:\-+.]", "_", job_id)

Review comment:
       Can you add test for this? It will help us avoid regression. Probably using parametrize will be good idea
   




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