in dev/breeze/src/airflow_breeze/params/shell_params.py [0:0]
def compose_file(self) -> str:
compose_file_list: list[Path] = []
backend_files: list[Path] = []
if self.backend != "all":
backend_files = self.get_backend_compose_files(self.backend)
else:
for backend in ALLOWED_BACKENDS:
backend_files.extend(self.get_backend_compose_files(backend))
if self.executor == CELERY_EXECUTOR:
compose_file_list.append(DOCKER_COMPOSE_DIR / "integration-celery.yml")
if self.use_airflow_version:
current_extras = self.airflow_extras
if "celery" not in current_extras.split(","):
get_console().print(
"[warning]Adding `celery` extras as it is implicitly needed by celery executor"
)
self.airflow_extras = (
",".join(current_extras.split(",") + ["celery"]) if current_extras else "celery"
)
compose_file_list.append(DOCKER_COMPOSE_DIR / "base.yml")
self.add_docker_in_docker(compose_file_list)
compose_file_list.extend(backend_files)
compose_file_list.append(DOCKER_COMPOSE_DIR / "files.yml")
if os.environ.get("CI", "false") == "true" and self.use_uv:
compose_file_list.append(DOCKER_COMPOSE_DIR / "ci-uv-tests.yml")
if self.use_airflow_version is not None and self.mount_sources not in USE_AIRFLOW_MOUNT_SOURCES:
get_console().print(
"\n[warning]Forcing --mount-sources to `remove` since we are not installing airflow "
f"from sources but from {self.use_airflow_version} since you attempt"
f" to use {self.mount_sources} (but you can use any of "
f"{USE_AIRFLOW_MOUNT_SOURCES} in such case[/]\n"
)
self.mount_sources = MOUNT_REMOVE
if self.mount_sources in USE_AIRFLOW_MOUNT_SOURCES and self.use_airflow_version is None:
get_console().print(
"[error]You need to specify `--use-airflow-version wheel | sdist` when using one of the"
f"{USE_AIRFLOW_MOUNT_SOURCES} mount sources[/]"
)
sys.exit(1)
if self.forward_ports and not self.project_name == "pre-commit":
compose_file_list.append(DOCKER_COMPOSE_DIR / "base-ports.yml")
if self.mount_sources == MOUNT_SELECTED:
compose_file_list.append(DOCKER_COMPOSE_DIR / "local.yml")
elif self.mount_sources == MOUNT_ALL:
compose_file_list.append(DOCKER_COMPOSE_DIR / "local-all-sources.yml")
elif self.mount_sources == MOUNT_TESTS:
compose_file_list.append(DOCKER_COMPOSE_DIR / "tests-sources.yml")
elif self.mount_sources == MOUNT_PROVIDERS_AND_TESTS:
compose_file_list.append(DOCKER_COMPOSE_DIR / "providers-and-tests-sources.yml")
elif self.mount_sources == MOUNT_REMOVE:
compose_file_list.append(DOCKER_COMPOSE_DIR / "remove-sources.yml")
if self.forward_credentials:
compose_file_list.append(DOCKER_COMPOSE_DIR / "forward-credentials.yml")
if self.include_mypy_volume:
compose_file_list.append(DOCKER_COMPOSE_DIR / "mypy.yml")
if "all-testable" in self.integration:
if self.test_group == GroupOfTests.INTEGRATION_CORE:
integrations = TESTABLE_CORE_INTEGRATIONS
elif self.test_group == GroupOfTests.INTEGRATION_PROVIDERS:
integrations = TESTABLE_PROVIDERS_INTEGRATIONS
else:
get_console().print(
"[error]You can only use `integration-core` or `integration-providers` test "
"group with `all-testable` integration."
)
sys.exit(1)
elif "all" in self.integration:
if self.test_group == GroupOfTests.CORE:
integrations = ALL_CORE_INTEGRATIONS
elif self.test_group == GroupOfTests.PROVIDERS:
integrations = ALL_PROVIDERS_INTEGRATIONS
else:
get_console().print(
"[error]You can only use `core` or `providers` test group with `all` integration."
)
sys.exit(1)
else:
integrations = self.integration
for integration in integrations:
compose_file_list.append(DOCKER_COMPOSE_DIR / f"integration-{integration}.yml")
if "trino" in integrations and "kerberos" not in integrations:
get_console().print(
"[warning]Adding `kerberos` integration as it is implicitly needed by trino",
)
compose_file_list.append(DOCKER_COMPOSE_DIR / "integration-kerberos.yml")
return os.pathsep.join([os.fspath(f) for f in compose_file_list])