Skip to content

Commit

Permalink
Fixed dask executor and tests (#22027)
Browse files Browse the repository at this point in the history
 Fixed dask executor and tests, distributed package does not ship with tests folder and the certificates, added certificates to certs folder

(cherry picked from commit d3c168c)
  • Loading branch information
subkanthi authored and potiuk committed Mar 24, 2022
1 parent 592a886 commit e089f66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion airflow/executors/dask_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def airflow_run():
raise AirflowException(f"Attempted to submit task to an unavailable queue: '{queue}'")
resources = {queue: 1}

future = self.client.submit(airflow_run, pure=False, resources=resources)
future = self.client.submit(subprocess.check_call, command, pure=False, resources=resources)
self.futures[future] = key # type: ignore

def _process_future(self, future: Future) -> None:
Expand Down
8 changes: 4 additions & 4 deletions tests/executors/test_dask_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# utility functions imported from the dask testing suite to instantiate a test
# cluster for tls tests
from distributed.utils_test import cluster as dask_testing_cluster, get_cert, tls_security
from distributed.utils_test import cluster as dask_testing_cluster, tls_security

from airflow.executors.dask_executor import DaskExecutor

Expand Down Expand Up @@ -112,9 +112,9 @@ def setUp(self):

@conf_vars(
{
('dask', 'tls_ca'): get_cert('tls-ca-cert.pem'),
('dask', 'tls_cert'): get_cert('tls-key-cert.pem'),
('dask', 'tls_key'): get_cert('tls-key.pem'),
('dask', 'tls_ca'): 'certs/tls-ca-cert.pem',
('dask', 'tls_cert'): 'certs/tls-key-cert.pem',
('dask', 'tls_key'): 'certs/tls-key.pem',
}
)
def test_tls(self):
Expand Down

0 comments on commit e089f66

Please sign in to comment.