Skip to content
Closed
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
1 change: 1 addition & 0 deletions dev/breeze/src/airflow_breeze/utils/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def run_docker_compose_tests(
env["SKIP_DOCKER_COMPOSE_DELETION"] = "true"
if include_success_outputs:
env["INCLUDE_SUCCESS_OUTPUTS"] = "true"
env["AIRFLOW_UID"] = str(os.getuid())
# since we are only running one test, we can print output directly with pytest -s
command_result = run_command(
["uv", "run", "pytest", str(test_path), "-s", *pytest_args, *extra_pytest_args],
Expand Down
4 changes: 4 additions & 0 deletions task-sdk-tests/tests/task_sdk_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import subprocess
import sys
from pathlib import Path
from shutil import copytree

import pytest

Expand All @@ -28,6 +29,7 @@
AIRFLOW_ROOT_PATH,
DOCKER_COMPOSE_FILE_PATH,
DOCKER_IMAGE,
TASK_SDK_DAGS_FOLDER,
TASK_SDK_HOST_PORT,
)

Expand Down Expand Up @@ -105,6 +107,7 @@ def docker_compose_setup(tmp_path_factory):
tmp_dir = tmp_path_factory.mktemp("airflow-task-sdk-test")
tmp_docker_compose_file = tmp_dir / "docker-compose.yaml"
copyfile(DOCKER_COMPOSE_FILE_PATH, tmp_docker_compose_file)
copytree(TASK_SDK_DAGS_FOLDER, tmp_dir / "dags", dirs_exist_ok=True)

# Set environment variables
os.environ["AIRFLOW_IMAGE_NAME"] = DOCKER_IMAGE
Expand All @@ -116,6 +119,7 @@ def docker_compose_setup(tmp_path_factory):
console.print("[yellow]Starting docker-compose for session...")
compose.compose.up(detach=True, wait=True)
console.print("[green]Docker compose started successfully!\n")
compose.compose.execute(service="airflow-dag-processor", command=["airflow", "dags", "reserialize"])
Comment thread
gopidesupavan marked this conversation as resolved.

yield compose
except Exception as e:
Expand Down
1 change: 1 addition & 0 deletions task-sdk-tests/tests/task_sdk_tests/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@
TASK_SDK_API_VERSION = "2025-09-23"

DOCKER_COMPOSE_FILE_PATH = TASK_SDK_TESTS_ROOT / "docker" / "docker-compose.yaml"
TASK_SDK_DAGS_FOLDER = TASK_SDK_TESTS_ROOT / "dags"