airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-5488) Remove unused variables from tmp_configuration_copy method
Date Mon, 16 Sep 2019 10:31:00 GMT

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

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

Commit 8ea2a07f2b81f5b302c66c383bdee1dafb779fb8 in airflow's branch refs/heads/master from
Jarek Potiuk
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=8ea2a07 ]

Revert "[AIRFLOW-5488]Remove unused variables from tmp_configuration_copy method (#6114)"
(#6120)

This reverts commit 31b7bc958ef3395a5f7307a852822eba81a5d663.

> Remove unused variables from tmp_configuration_copy method
> ----------------------------------------------------------
>
>                 Key: AIRFLOW-5488
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5488
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: utils
>    Affects Versions: 1.10.6
>            Reporter: Jakob Homan
>            Priority: Minor
>              Labels: ccoss2019, newbie
>
> Note: This ticket's being created to facilitate a new contributor's workshop for Airflow.
After the workshop has completed, I'll mark these all available for anyone that might like
to take them on.
> This method for making a temporary file with configuration has two parameters, `include_env`
and `include_cmds` that are never used and should be removed.
> airflow/utils/configuration.py:27
> {code:java}
> def tmp_configuration_copy(chmod=0o600, include_env=True, include_cmds=True):
>     """
>     Returns a path for a temporary file including a full copy of the configuration
>     settings.
>     :return: a path to a temporary file
>     """
>     cfg_dict = conf.as_dict(display_sensitive=True, raw=True)
>     temp_fd, cfg_path = mkstemp()
>     with os.fdopen(temp_fd, 'w') as temp_file:
>         # Set the permissions before we write anything to it.
>         if chmod is not None:
>             os.fchmod(temp_fd, chmod)
>         json.dump(cfg_dict, temp_file)
>     return cfg_path {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message