Skip to content

Commit

Permalink
Fix CI errors, typos and static checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jscheffl committed Dec 17, 2024
1 parent 54775d6 commit 7d10ad9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion providers/src/airflow/providers/edge/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Changelog
---------

0.10.0pre0
.........
..........

Feature
~~~~~~~
Expand Down
11 changes: 6 additions & 5 deletions providers/tests/edge/cli/test_edge_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def dummy_joblist(self, tmp_path: Path) -> list[_Job]:
map_index=-1,
try_number=1,
concurrency_slots=1,
command=MOCK_COMMAND,
command=MOCK_COMMAND, # type: ignore[arg-type]
),
process=_MockPopen(),
logfile=logfile,
Expand All @@ -144,7 +144,8 @@ def test_launch_job(self, mock_popen, mock_logfile_path, mock_process, worker_wi
mock_process.side_effect = [mock_process_instance]

edge_job = worker_with_job.jobs.pop().edge_job
worker_with_job._launch_job(edge_job)
with conf_vars({("edge", "api_url"): "https://invalid-api-test-endpoint"}):
worker_with_job._launch_job(edge_job)

if AIRFLOW_V_3_0_PLUS:
assert mock_process.call_count == 1
Expand All @@ -168,7 +169,7 @@ def test_launch_job(self, mock_popen, mock_logfile_path, mock_process, worker_wi
map_index=-1,
try_number=1,
concurrency_slots=1,
command=MOCK_COMMAND,
command=MOCK_COMMAND, # type: ignore[arg-type]
),
True,
(1, 1),
Expand Down Expand Up @@ -218,7 +219,7 @@ def test_check_running_jobs_running(self, worker_with_job: _EdgeWorkerCli):
@patch("airflow.providers.edge.cli.edge_command.jobs_set_state")
def test_check_running_jobs_success(self, mock_set_state, worker_with_job: _EdgeWorkerCli):
job = worker_with_job.jobs[0]
job.process.generated_returncode = 0 # type: ignore[attr-defined]
job.process.generated_returncode = 0 # type: ignore[union-attr]
with conf_vars({("edge", "api_url"): "https://invalid-api-test-endpoint"}):
worker_with_job.check_running_jobs()
assert len(worker_with_job.jobs) == 0
Expand All @@ -228,7 +229,7 @@ def test_check_running_jobs_success(self, mock_set_state, worker_with_job: _Edge
@patch("airflow.providers.edge.cli.edge_command.jobs_set_state")
def test_check_running_jobs_failed(self, mock_set_state, worker_with_job: _EdgeWorkerCli):
job = worker_with_job.jobs[0]
job.process.generated_returncode = 42 # type: ignore[attr-defined]
job.process.generated_returncode = 42 # type: ignore[union-attr]
with conf_vars({("edge", "api_url"): "https://invalid-api-test-endpoint"}):
worker_with_job.check_running_jobs()
assert len(worker_with_job.jobs) == 0
Expand Down

0 comments on commit 7d10ad9

Please sign in to comment.