airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edgar Rodriguez (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AIRFLOW-2084) CLI `airflow run` removes file pointed by argument cfg_path without any context
Date Fri, 09 Feb 2018 05:40:00 GMT
Edgar Rodriguez created AIRFLOW-2084:
----------------------------------------

             Summary: CLI `airflow run` removes file pointed by argument cfg_path without
any context
                 Key: AIRFLOW-2084
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2084
             Project: Apache Airflow
          Issue Type: Bug
            Reporter: Edgar Rodriguez


When running `airflow run` via the CLI and the `cfg_path` is passed ([https://github.com/apache/incubator-airflow/blob/master/airflow/bin/cli.py#L379)] the
file is removed. This is usually a bad pattern because the {{run}} command in the {{cli}} (a
new process) is removing a file it does not maintain, making it harder for the caller (the
parent process) to clean up the files that it actually creates / maintains. Furthermore, the
process removing the file does not have any more context about the file, making this code
brittle.

This design gets in the way of implementing proper handling from the parent processes providing
the configuration files, which ideally should be using a context manager.

For more referece see: https://github.com/apache/incubator-airflow/pull/2991#discussion_r166745402



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

Mime
View raw message