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

Fix to run tasks on Dask Worker for Windows systems #29107

Merged

Conversation

casra-developers
Copy link
Contributor

Fix for using Airflow module on Windows Dask Worker

In the latest release of Airflow (tested with 2.5.1), task execution on a Dask Worker will fail on Windows due to the usage of an unknown attribute from the signal module.

The offending line is located in airflow/jobs/local_task_job.py

signal.signal(signal.SIGUSR2, sigusr2_debug_handler)

In this PR we have not removed the line but simply put it in the scope of an IF condition that skips it if the constant IS_WINDOWS from airflow.utils.platform is True. This mitigates the issue and allows the Windows systems to be used as Dask Workers for Airflow.

Having Windows Workers for our Airflow Cluster is a very important use-case in our company, due to some legacy dependencies that still need to be supported. Others may find this useful, hence why we share this simple fix and propose to include the change that will have no effect on POSIX based systems.

@boring-cyborg boring-cyborg bot added the area:Scheduler Scheduler or dag parsing Issues label Jan 23, 2023
@potiuk potiuk merged commit f8e8fc0 into apache:main Jan 23, 2023
@potiuk potiuk added this to the Airflow 2.5.2 milestone Jan 23, 2023
@potiuk
Copy link
Member

potiuk commented Jan 23, 2023

Agree - not a problem to have it in. Marked it as "2.5.2" so when we release it, you won't have to patch it.

@casra-developers
Copy link
Contributor Author

@potiuk Glad to hear it, thank you :)

@casra-developers casra-developers deleted the enable-dask-worker-usage-on-windows branch January 24, 2023 06:52
@pierrejeambrun pierrejeambrun added the type:bug-fix Changelog: Bug Fixes label Feb 27, 2023
@pierrejeambrun pierrejeambrun changed the title PR: Introduced fix to run tasks on Windows systems Introduced fix to run tasks on Windows systems Feb 27, 2023
@pierrejeambrun pierrejeambrun changed the title Introduced fix to run tasks on Windows systems Fix to run tasks on Windows systems Feb 27, 2023
@pierrejeambrun pierrejeambrun changed the title Fix to run tasks on Windows systems Fix to run tasks on Dask Windows systems Feb 27, 2023
@pierrejeambrun pierrejeambrun changed the title Fix to run tasks on Dask Windows systems Fix to run tasks on Dask Worker for Windows systems Feb 27, 2023
pierrejeambrun pushed a commit that referenced this pull request Mar 7, 2023
* Introduced fix to run tasks on Windows

Co-authored-by: Dominik Werner <dwerner@casra.ch>
(cherry picked from commit f8e8fc0)
pierrejeambrun pushed a commit that referenced this pull request Mar 8, 2023
* Introduced fix to run tasks on Windows

Co-authored-by: Dominik Werner <dwerner@casra.ch>
(cherry picked from commit f8e8fc0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Scheduler Scheduler or dag parsing Issues type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants