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 2022/01/10 17:27:28 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #20645: config command to toggle asciiart, cheatsheet

potiuk commented on a change in pull request #20645:
URL: https://github.com/apache/airflow/pull/20645#discussion_r781398988



##########
File path: dev/breeze/src/airflow_breeze/breeze.py
##########
@@ -192,6 +193,32 @@ def build_prod_image(verbose: bool):
     raise ClickException("\nPlease implement building the Production image\n")
 
 
+@main.command(name='config')
+@click.option('--python', type=click.Choice(ALLOWED_PYTHON_MAJOR_MINOR_VERSION))
+@click.option('--backend', type=click.Choice(ALLOWED_BACKENDS))
+@click.option('--cheatsheet/--no-cheatsheet', default=False)
+@click.option('--asciiart/--no-asciiart', default=False)
+def change_config(python, backend, cheatsheet=False, asciiart=False):
+    from airflow_breeze.cache import delete_cache, touch_cache_file, write_to_cache_file

Review comment:
       There is a small problem with this approach. Currently when you specify only one of the options, the other is automatically set to False (because of the default = False).
   
   For example if you run `config --cheatsheet` you will always get `.SUPPRESS_ASCIIART` generated.
   
   What will work is :
   
   1) make default = None
   2) check if asciiart/cheatsheet are Note in else
   
   I am adding suggestions . 




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