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_r320029937
##########
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:
I think that nobody cares about having extra labels. Each resource can have
many labels and one additional will support the work, but it will not cause
trouble.
If someone debugs their problems, they will be able to do so with additional
information from labels. We should think about the fact that users often do not
think about future problems. When there is a problem, they look for a solution,
and an additional tip can be very helpful.
Labels are added very often if you create resources using google-cloud, so
users can even expect that these labels will exist if using a Cloud Composer. I
attach a sample instance of Cloud Composer
<img width="731" alt="Screenshot 2019-09-02 at 20 14 07"
src="https://user-images.githubusercontent.com/12058428/64129782-8e83e680-cdbe-11e9-823a-0aacc013692a.png">
So yes. In my opinion, labels are very helpful. This task was created by me
5 days ago:
https://github.com/PolideaInternal/airflow/issues/265
----------------------------------------------------------------
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