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

Add explicit session parameter in PoolSlotsAvailableDep #18875

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow/ti_deps/deps/pool_slots_available_dep.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _get_dep_statuses(self, ti, session, dep_context=None):
else:
# Controlled by UNIQUE key in slot_pool table,
# only one result can be returned.
open_slots = pools[0].open_slots()
open_slots = pools[0].open_slots(session=session)

if ti.state in EXECUTION_STATES:
open_slots += ti.pool_slots
Expand Down
2 changes: 1 addition & 1 deletion tests/jobs/test_local_task_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,5 +879,5 @@ def test_number_of_queries_single_loop(mock_get_task_runner, return_codes, dag_m
ti.refresh_from_task(task)

job = LocalTaskJob(task_instance=ti, executor=MockExecutor())
with assert_queries_count(20):
with assert_queries_count(18):
job.run()