apache/airflow

Don't have session.commit() when @provide_session decorator is used

開放

#12,818 建立於 2020年12月4日

 (10 則留言) (0 個反應) (1 位負責人)Python (16,781 個分叉)batch import
area:MetaDBcontributors-workshopgood first issuekind:taskpriority:medium

倉庫指標

星標
 (44,809 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

As discussed in https://github.com/apache/airflow/pull/12815#discussion_r536283503 and pointed out at https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#database-session-handling, we should not have session.commit() when @provide_session decorator is used (for principle "Explicit is better than implicit").

This issue exists in files like https://github.com/apache/airflow/blob/2936c13a44369daae9d6099cd1070b3a8cd53443/airflow/models/dag.py (and some more of course)

貢獻者指南