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 2018/12/10 08:57:13 UTC
[GitHub] ashb commented on a change in pull request #4174: [AIRFLOW-571]
Airflow CLI: add gunicorn_config param and refactor webserver cli function
ashb commented on a change in pull request #4174: [AIRFLOW-571] Airflow CLI: add gunicorn_config param and refactor webserver cli function
URL: https://github.com/apache/incubator-airflow/pull/4174#discussion_r240123267
##########
File path: airflow/bin/airflow
##########
@@ -28,5 +28,6 @@ if __name__ == '__main__':
os.environ['KRB5_KTNAME'] = configuration.conf.get('kerberos', 'keytab')
parser = CLIFactory.get_parser()
- args = parser.parse_args()
- args.func(args)
+ args = parser.parse_known_args()
Review comment:
Hmmmm.
So the problem with doing this is that now all arguments will accept and silently ignore unknown args, which is not great user behaviour.
**Before**:
```
airflow version --flibble --flux
[2018-12-10 08:49:38,495] {__init__.py:51} INFO - Using executor SequentialExecutor
usage: airflow [-h]
{kerberos,run,worker,task_failed_deps,scheduler,users,resetdb,upgradedb,trigger_dag,flower,unpause,webserver,variables,serve_logs,list_tasks,list_dags,delete_dag,pause,pool,version,render,sync_perm,test,dag_state,initdb,clear,backfill,connections,list_dag_runs,next_execution,task_state}
...
airflow: error: unrecognized arguments: --flibble --flux
```
**After:**
```
airflow version --flibble --flux
[2018-12-10 08:49:42,827] {__init__.py:51} INFO - Using executor SequentialExecutor
____________ _____________
____ |__( )_________ __/__ /________ __
____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
_/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
v2.0.0.dev0+incubating
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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