apache/airflow

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

Open

#12.818 aperta il 4 dic 2020

Vedi su GitHub
 (10 commenti) (0 reazioni) (1 assegnatario)Python (16.781 fork)batch import
area:MetaDBcontributors-workshopgood first issuekind:taskpriority:medium

Metriche repository

Star
 (44.809 star)
Metriche merge PR
 (Merge medio 7g 18h) (834 PR mergiate in 30 g)

Descrizione

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)

Guida contributor