diff --git a/providers/src/airflow/providers/edge/CHANGELOG.rst b/providers/src/airflow/providers/edge/CHANGELOG.rst index bdb34450d1c3f7..56f2dc1243c5c4 100644 --- a/providers/src/airflow/providers/edge/CHANGELOG.rst +++ b/providers/src/airflow/providers/edge/CHANGELOG.rst @@ -27,6 +27,14 @@ Changelog --------- +0.2.2re0 +......... + +Misc +~~~~ + +* ``Fixed type confusion for PID file paths (#43308)`` + 0.2.1re0 ......... diff --git a/providers/src/airflow/providers/edge/cli/edge_command.py b/providers/src/airflow/providers/edge/cli/edge_command.py index 37ce931957bb08..1d5013703c3ba2 100644 --- a/providers/src/airflow/providers/edge/cli/edge_command.py +++ b/providers/src/airflow/providers/edge/cli/edge_command.py @@ -95,9 +95,9 @@ def _pid_file_path(pid_file: str | None) -> str: return cli_utils.setup_locations(process=EDGE_WORKER_PROCESS_NAME, pid=pid_file)[0] -def _write_pid_to_pidfile(pid_file_path): +def _write_pid_to_pidfile(pid_file_path: str): """Write PIDs for Edge Workers to disk, handling existing PID files.""" - if pid_file_path.exists(): + if Path(pid_file_path).exists(): # Handle existing PID files on disk logger.info("An existing PID file has been found: %s.", pid_file_path) pid_stored_in_pid_file = read_pid_from_pidfile(pid_file_path) @@ -142,7 +142,7 @@ class _EdgeWorkerCli: def __init__( self, - pid_file_path: Path, + pid_file_path: str, hostname: str, queues: list[str] | None, concurrency: int, diff --git a/providers/src/airflow/providers/edge/provider.yaml b/providers/src/airflow/providers/edge/provider.yaml index f6e4cbde93d917..32952295a97690 100644 --- a/providers/src/airflow/providers/edge/provider.yaml +++ b/providers/src/airflow/providers/edge/provider.yaml @@ -23,10 +23,10 @@ description: | Handle edge workers on remote sites via HTTP(s) connection and orchestrates work over distributed sites state: not-ready -source-date-epoch: 1729588146 +source-date-epoch: 1729683247 # note that those versions are maintained by release manager - do not update them manually versions: - - 0.2.1pre0 + - 0.2.2pre0 dependencies: - apache-airflow>=2.10.0 diff --git a/providers/tests/edge/cli/test_edge_command.py b/providers/tests/edge/cli/test_edge_command.py index 5014edea11d4a2..51aad5806802e8 100644 --- a/providers/tests/edge/cli/test_edge_command.py +++ b/providers/tests/edge/cli/test_edge_command.py @@ -120,7 +120,7 @@ def returncode(self): @pytest.fixture def worker_with_job(self, tmp_path: Path, dummy_joblist: list[_Job]) -> _EdgeWorkerCli: - test_worker = _EdgeWorkerCli(tmp_path / "dummy.pid", "dummy", None, 8, 5, 5) + test_worker = _EdgeWorkerCli(str(tmp_path / "dummy.pid"), "dummy", None, 8, 5, 5) test_worker.jobs = dummy_joblist return test_worker diff --git a/providers/tests/edge/models/test_edge_worker.py b/providers/tests/edge/models/test_edge_worker.py index d67cfdbb2cd613..20e394ffd57673 100644 --- a/providers/tests/edge/models/test_edge_worker.py +++ b/providers/tests/edge/models/test_edge_worker.py @@ -39,7 +39,7 @@ class TestEdgeWorker: @pytest.fixture def cli_worker(self, tmp_path: Path) -> _EdgeWorkerCli: - test_worker = _EdgeWorkerCli(tmp_path / "dummy.pid", "dummy", None, 8, 5, 5) + test_worker = _EdgeWorkerCli(str(tmp_path / "dummy.pid"), "dummy", None, 8, 5, 5) return test_worker @pytest.fixture(autouse=True)