[ 
https://issues.apache.org/jira/browse/AIRFLOW-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16576522#comment-16576522
 ] 

ASF subversion and git services commented on AIRFLOW-2786:
----------------------------------------------------------

Commit a29fe350164937b28f525b46f7aecbc309665e5a in incubator-airflow's branch 
refs/heads/master from [~noremac201]
[ https://gitbox.apache.org/repos/asf?p=incubator-airflow.git;h=a29fe35 ]

[AIRFLOW-2786] Gracefully handle Variable import errors (#3648)

Variables that are added through a file are not
checked as explicity as creating a Variable in the
web UI. This handles exceptions that could be caused
by improper keys or values.

> Variables view fails to render if a variable has an empty key
> -------------------------------------------------------------
>
>                 Key: AIRFLOW-2786
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2786
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: Trevor Edwards
>            Assignee: Cameron Moberg
>            Priority: Minor
>
> Reported 
> [here|[https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/cloud-composer-discuss/OkYMeuwqOpU]]
>  if a Variable has an empty key, the Variables tab is not accessible.
> A similar issue occurs if the variable has non-ascii characters in the key or 
> value, I believe.
>  
> Part of the relevant stacktrace:
>  
> {code:java}
>   File "/usr/local/lib/python2.7/site-packages/flask_admin/model/base.py", 
> line 1742, in get_list_value
>     self.column_type_formatters,
>   File "/usr/local/lib/python2.7/site-packages/flask_admin/model/base.py", 
> line 1707, in _get_list_value
>     value = column_fmt(self, context, model, name)
>   File "/usr/local/lib/python2.7/site-packages/airflow/www/views.py", line 
> 2269, in hidden_field_formatter
>     if wwwutils.should_hide_value_for_key(model.key):
>   File "/usr/local/lib/python2.7/site-packages/airflow/www/utils.py", line 
> 49, in should_hide_value_for_key
>     return any(s in key_name.lower() for s in 
> DEFAULT_SENSITIVE_VARIABLE_FIELDS) \
>   File "/usr/local/lib/python2.7/site-packages/airflow/www/utils.py", line 
> 49, in <genexpr>
>     return any(s in key_name.lower() for s in 
> DEFAULT_SENSITIVE_VARIABLE_FIELDS) \
> AttributeError: 'NoneType' object has no attribute 'lower'
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to