apache / apache/airflow

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

Open
#12,818 11 comments 0 reactions 1 assignee Claimed by @amoghrajesh View on GitHub
area:MetaDB good first issue kind:task priority:medium
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 9h
Merged PRs (30d)
472

Description

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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.