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/05/18 09:59:04 UTC

[GitHub] [airflow] JavierLTPromofarma opened a new issue #8899: Get UI color of DAGs from airflow.cfg

JavierLTPromofarma opened a new issue #8899:
URL: https://github.com/apache/airflow/issues/8899


   **Description**
   
   Being able to get different ui colors than the default ones for operators from airflow.cfg file 
   
   **Use case / motivation**
   I want to have more vivid colors for the operators, for being able to notice at a glance which operators are present. Nowadays the operators have different colors, but sometimes they are very similar and it's not that easy to differentiate them.
   Currently, this change has to be done modifying the operator file in the installation folder of Airflow, which is inconvenient.
   
   It would be nice to have something like this in airflow.cfg:
   [colors]
   S3ToRedshiftOperator = #blabla
   DummyOperator #nicecolor


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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #8899: Get UI color of DAGs from airflow.cfg

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #8899:
URL: https://github.com/apache/airflow/issues/8899#issuecomment-630078553


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


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



[GitHub] [airflow] mik-laj commented on issue #8899: Get UI color of operators from airflow.cfg

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #8899:
URL: https://github.com/apache/airflow/issues/8899#issuecomment-896710789


   You can use Cluster Policy for DAG as well as Cluster Policy for tasks. The difference is very small. In this case, using the cluster policy for tasks will be easier.
   https://github.com/apache/airflow/blob/e6c61ca679cc2332eb5bce3ff01f961f55223374/airflow/models/dagbag.py#L430-L434
   
   There are two attributes to configure tasks colors.
   https://github.com/apache/airflow/blob/e6c61ca679cc2332eb5bce3ff01f961f55223374/airflow/models/baseoperator.py#L407-L408


-- 
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-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] turbaszek commented on issue #8899: Get UI color of operators from airflow.cfg

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #8899:
URL: https://github.com/apache/airflow/issues/8899#issuecomment-630785022


   > Furthermore, I see other cases where a customization would be needed: color blindness (there are different types and would be impossible to satisfy all of them), strong personal preferences for other colors than the default ones, very bad screens that don't show correctly certain colors...
   
   This sounds like a user preference and probably should be configured on a per user basis. Thus, I'm not sure if config (which is one for all Airflow deployment users) is the best place for such customization. 
   
   


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



[GitHub] [airflow] JavierLTPromofarma commented on issue #8899: Get UI color of operators from airflow.cfg

Posted by GitBox <gi...@apache.org>.
JavierLTPromofarma commented on issue #8899:
URL: https://github.com/apache/airflow/issues/8899#issuecomment-632098153


   I'm not sure either, but I think this customization has to be addressed somehow in order to avoid the necessity of modifying the core code of Airflow. Do you (or anyone) come up with something? 


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



[GitHub] [airflow] mik-laj commented on issue #8899: Get UI color of operators from airflow.cfg

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #8899:
URL: https://github.com/apache/airflow/issues/8899#issuecomment-632133779


   @JavierLTPromofarma Have you tried to set a cluster policy? I think it should work.
   https://airflow.readthedocs.io/en/latest/concepts.html#cluster-policy


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



[GitHub] [airflow] JavierLTPromofarma commented on issue #8899: Get UI color of operators from airflow.cfg

Posted by GitBox <gi...@apache.org>.
JavierLTPromofarma commented on issue #8899:
URL: https://github.com/apache/airflow/issues/8899#issuecomment-630728004


   Thanks for answering Tomek. The idea is not to have all the operators with a color in the config, but only the operators you want to modify it. So if you like all the default colors, your [colors] section will be empty, or even won't be there. Otherwise, if you want (as the most likely case) a few modifications, it would be just a few lines, that could be at the end of everything or even in the webserver config file. 
   
   I am not sure if it would make sense the standardization, since every project/company uses a different combination of Operators, and I think it would still require some customization. For instance, we could set the color of Azure Storage, Google Cloud Storage and S3 operators under the premise that usually they are not used together, and use the same color for all of them, but probably there would be out there at least one person who would need to use more than one service in the same DAG and hence customize the color. 
   
   Furthermore, I see other cases where a customization would be needed: color blindness (there are different types and would be impossible to satisfy all of them), strong personal preferences for other colors than the default ones, very bad screens that don't show correctly certain colors... 


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



[GitHub] [airflow] JavierLopezT commented on issue #8899: Get UI color of operators from airflow.cfg

Posted by GitBox <gi...@apache.org>.
JavierLopezT commented on issue #8899:
URL: https://github.com/apache/airflow/issues/8899#issuecomment-896691954


   Hi @mik-laj and @turbaszek Do you think this could be achieved with DAG cluster policy or should I use task cluster policy? Also, is there a task.color property or something like that? Hopefully I can make it work with cluster policy and close this issue as well adding some docs 


-- 
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-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] turbaszek commented on issue #8899: Get UI color of operators from airflow.cfg

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #8899:
URL: https://github.com/apache/airflow/issues/8899#issuecomment-630643217


   Hi @JavierLTPromofarma I like the idea in general. However, I think that it may make config a little bit messy. I am also wondering if it would make sense to somehow unify / standardize approach to operators UI colors, WDYT?


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