Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed dask executor and tests #22027

Merged
merged 10 commits into from
Mar 8, 2022
Merged

Fixed dask executor and tests #22027

merged 10 commits into from
Mar 8, 2022

Conversation

subkanthi
Copy link
Contributor

@subkanthi subkanthi commented Mar 6, 2022

Fixed dask executor and tests.

Distributed pip package does not ship with tests folder anymore.
And there is a python script in distributed/tests to create the certificates.

Two tests are still failing, test_tls and test_backfill_integration.

The certificates cause a spelling error, not sure if we really need this test where certs are bundled.

related: #22017


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

… tests folder and the certificates, added certificates to certs folder
@subkanthi subkanthi requested review from kaxil, XD-DENG and ashb as code owners March 6, 2022 21:05
@boring-cyborg boring-cyborg bot added the area:Scheduler including HA (high availability) scheduler label Mar 6, 2022
@@ -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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to #11451

@subkanthi subkanthi marked this pull request as draft March 6, 2022 21:06
@subkanthi subkanthi marked this pull request as ready for review March 6, 2022 21:06
@subkanthi subkanthi changed the title Fixed dask executor and tests WIP - Fixed dask executor and tests Mar 6, 2022
@potiuk
Copy link
Member

potiuk commented Mar 6, 2022

Ah, nice. If we can make it works that would be cool :).

@potiuk potiuk self-requested a review March 7, 2022 00:11
# These use test certs that ship with dask/distributed and should not be
# used in production
with dask_testing_cluster(
worker_kwargs={'security': tls_security(), "protocol": "tls"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tls_security in utils_test.py part of distributed seems to look for the certs in the tests/ path
path = os.path.join(certs_dir, filename)
For now commenting out if its OK, the other tests seem to pass

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see. They did not for me when I run them previously.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atleast on my local, most of the tests were failing because of errors with pickling the function, the change in [airflow/executors/dask_executor.py], fixed it

   - future = self.client.submit(airflow_run, pure=False, resources=resources)
   + future = self.client.submit(subprocess.check_call, command, pure=False, resources=resources)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool @subkanthi ! Looks good. I think you can bring back the tests now - in my change (when you rebase) you will see how I dealt with get_cert to skip those

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you cna ucomment your line comments now :).

@potiuk
Copy link
Member

potiuk commented Mar 7, 2022

I think the problem is that constraints have not been refreshed yet. Let's try tomorrow.

@potiuk
Copy link
Member

potiuk commented Mar 7, 2022

Can you please rebase @subkanthi - I have just updated the constraints.

@subkanthi subkanthi changed the title WIP - Fixed dask executor and tests Fixed dask executor and tests Mar 7, 2022
@github-actions
Copy link

github-actions bot commented Mar 8, 2022

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Mar 8, 2022
@potiuk
Copy link
Member

potiuk commented Mar 8, 2022

Wohooo!! Thanks @subkanthi !

@potiuk potiuk merged commit d3c168c into apache:main Mar 8, 2022
potiuk pushed a commit that referenced this pull request Mar 24, 2022
 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)
potiuk pushed a commit that referenced this pull request Mar 25, 2022
 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)
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Mar 26, 2022
@ephraimbuddy ephraimbuddy added this to the Airflow 2.2.5 milestone Mar 26, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 26, 2022
 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)
ephraimbuddy pushed a commit that referenced this pull request Mar 26, 2022
 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Scheduler including HA (high availability) scheduler full tests needed We need to run full set of tests for this PR to merge type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants