You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2019/10/16 16:51:00 UTC

[jira] [Commented] (AIRFLOW-5643) S3Hook logic is duplicated and could be clearer

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

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

Commit ac42428bf530c259ab1b0dca08458c1ebf49b04a in airflow's branch refs/heads/master from Louis Guitton
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=ac42428 ]

[AIRFLOW-5643] Reduce duplicated logic in S3Hook (#6313)

S3Hook.load_bytes is duplicating the logic of S3Hook.load_file_obj.
Instead, we should stay consistent : S3Hook.load_string is already
delegating the logic to S3Hook.load_bytes, so we can use the same
approach to delegate to S3Hook.load_file_obj

> S3Hook logic is duplicated and could be clearer
> -----------------------------------------------
>
>                 Key: AIRFLOW-5643
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5643
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: aws, hooks
>    Affects Versions: 1.10.5
>            Reporter: Louis Guitton
>            Assignee: Louis Guitton
>            Priority: Trivial
>
> S3Hook.load_bytes is duplicating the logic of S3Hook.load_file_obj
> [https://github.com/apache/airflow/blob/master/airflow/hooks/S3_hook.py#L464-L539|https://github.com/apache/airflow/blob/master/airflow/hooks/S3_hook.py#L465-L539]
> Instead, we should stay consistent : S3Hook.load_string is already delegating the logic to S3Hook.load_bytes, so we can use the same approach to delegate to S3Hook.load_file_obj



--
This message was sent by Atlassian Jira
(v8.3.4#803005)