Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable ORM access from Tasks, DAG processing and Triggers #47320

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ashb
Copy link
Member

@ashb ashb commented Mar 3, 2025

It's about time we delivered on one of the key points of AIP-72: DB isolation from workers.
(To be honest, it's probably past time, but now is the second best time)

All of these use the Workload supervisor from the TaskSDK and the main paths
XCom, Variables and Secrets) have all been ported to use the Execution API,
so it's about time we disabled DB access.

Note: this will almost certainly break a few things, like Skip mixin based tasks in particular - that is WIP in 46584

Also closes #47232 as that was failing if configure_orm was never called.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:logging area:providers area:task-sdk provider:amazon AWS/Amazon - related issues provider:edge Edge Executor / Worker (AIP-69) provider:fab labels Mar 3, 2025
@ashb ashb force-pushed the disable-db-access-tasks branch from 18faa85 to eb14f67 Compare March 3, 2025 23:24
@ashb ashb changed the title disable db access tasks Disable ORM access from Tasks, DAG processing and Triggers Mar 3, 2025
@ashb ashb force-pushed the disable-db-access-tasks branch from eb14f67 to 2a77c31 Compare March 4, 2025 11:21
@ashb ashb requested a review from hussein-awala as a code owner March 4, 2025 11:21
@ashb ashb requested a review from jedcunningham as a code owner March 4, 2025 14:01
@@ -101,7 +101,7 @@
"""

engine: Engine
Session: Callable[..., SASession]
Session: sessionmaker
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not needed,

Suggested change
Session: sessionmaker
Session: Callable[..., SASession]

All of these use the Workload supervisor from the TaskSDK and the main paths
(XCom, Variables and Secrets) have all been ported to use the Execution API,
so it's about time we disabled DB access.
@ashb ashb force-pushed the disable-db-access-tasks branch from e55d781 to 1176f81 Compare March 4, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:logging area:providers area:task-sdk provider:amazon AWS/Amazon - related issues provider:edge Edge Executor / Worker (AIP-69) provider:fab
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in testing re logging re task sdk
3 participants