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] [Closed] (AIRFLOW-2246) Add error messaging to CLI variable import
Date Fri, 23 Mar 2018 14:42:00 GMT

     [ https://issues.apache.org/jira/browse/AIRFLOW-2246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Blake Livingston closed AIRFLOW-2246.
-------------------------------------
    Resolution: Cannot Reproduce

Sorry for the noise - wasn't able to reproduce the problem importing numbers in the latest
version. May still make a PR for some sort of error messaging.

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