airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Blake Livingston (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-2246) Add error messaging to CLI variable import
Date Fri, 23 Mar 2018 14:01:00 GMT

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

Blake Livingston commented on AIRFLOW-2246:
-------------------------------------------

I will see if I can put together a PR for this within the week.

 

> Add error messaging to CLI variable import
> ------------------------------------------
>
>                 Key: AIRFLOW-2246
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2246
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: cli
>    Affects Versions: Airflow 1.8
>            Reporter: Blake Livingston
>            Priority: Minor
>
> When importing variables from the CLI, the load will be incomplete if any of the variable
values fail to parse. In the case I noticed, I had used a Number rather than a string.
> E.g.
> { "var1": "OK",
>   "var2": 4,
>   "var3", "skipped"}
> airflow variables -i vars.json
> will unhelpfully return:
> "1 of 3 variables successfully updated."
> I believe this is due to passing on Exception here:
> [https://github.com/apache/incubator-airflow/blob/master/airflow/bin/cli.py#L306]
> Would be cool to just write an error with the variable, value, and exception message.
> next level of safety+usability would be to have it validate all variables before applying
them. An atomic failure is safer and preferable to a partial load for most users, I would
suspect.



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

Mime
View raw message