airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] mik-laj commented on a change in pull request #5987: [AIRFLOW-5388] Add airflow version label to newly created buckets
Date Mon, 02 Sep 2019 17:56:49 GMT
mik-laj commented on a change in pull request #5987: [AIRFLOW-5388] Add airflow version label
to newly created buckets
URL: https://github.com/apache/airflow/pull/5987#discussion_r320027413
 
 

 ##########
 File path: airflow/contrib/hooks/gcs_hook.py
 ##########
 @@ -439,6 +440,10 @@ def create_bucket(self,
         self.log.info('Creating Bucket: %s; Location: %s; Storage Class: %s',
                       bucket_name, location, storage_class)
 
+        # Add airflow-version label to the bucket
+        labels = {} or labels
+        labels['airflow-version'] = 'v' + version.replace('.', '-').replace('+', '-')
 
 Review comment:
   This change results from the operator's retrofitting to comply with the integration guide.
   
   > Tracking GCP resources
   > To tag and track GCP resources spawned from Airflow, we have been adding airflow specific
label(s) to GCP API service calls whenever possible and applicable. For example, we add “airflow-version”
label to the dataproc cluster created. We expect new GCP service operators will also add Airflow
top-level label “airflow-version” in addition to any service specific labels. 
   
   https://docs.google.com/document/d/1_rTdJSLCt0eyrAylmmgYc3yZr-_h51fVlnvMmWqhCkY/edit?ts=5bb72dfd#heading=h.996h79og5y2z

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


With regards,
Apache Git Services

Mime
View raw message