apache / apache/airflow

Allow Variable.get_variable_from_secrets to reuse a caller's session

Closed
#71,801 0 comments 0 reactions 1 assignee Claimed by @seanghaeli View on GitHub
area:core kind:feature
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 9h
Merged PRs (30d)
472

Description

The helper can't be used under the scheduler's `prohibit_commit`: `MetastoreBackend.get_variable`'s `@provide_session` opens the same scoped session and its commit trips the guard, so such callers must duplicate the backend walk.

Fix: optional keyword-only `session=None`, forwarded only to `MetastoreBackend`. Then the duplicated loop in `serialization/definitions/dag.py` can be deleted (see #68917).

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.