Skip to content

Fix error handling when pre-importing modules in DAGs - #31401

Merged
uranusjr merged 2 commits into
apache:mainfrom
astronomer:fix_bad_zip_import
May 19, 2023
Merged

uranusjr merged 2 commits into
apache:mainfrom
astronomer:fix_bad_zip_import

Conversation

@jedcunningham

@jedcunningham jedcunningham commented May 18, 2023 •

Copy link
Copy Markdown
Member

We shouldn't raise an exception if the file we are trying to pre-import
modules from has a nullbyte. It's likely not even a python DAG.

Related: #30495, #31061

We shouldn't raise an exception if the file we are trying to pre-import
modules from has a nullbyte. It's likely not even a python DAG.
Comment thread airflow/utils/file.py Resolved
Comment thread airflow/utils/file.py Resolved
@uranusjr
uranusjr merged commit 24a94bb into apache:main May 19, 2023
@uranusjr
uranusjr deleted the fix_bad_zip_import branch May 19, 2023 01:39
danielvdende added a commit to godatadriven/whirl that referenced this pull request May 26, 2023
A problem was introduced in Airflow 2.6.0. Due to [PR30495](apache/airflow#30495)
in Airflow, if any binary files happen to be in the `dags` folder,
the dag processor manager will constantly crash, resulting in
no DAGs being properly parsed. It's caused by some over-eager
parsing of all files, regardless of type.

The working fix is to ensure that these binary files are in the .airflowignore
file, as mentioned [here](apache/airflow#31519).

A different fix was supposed to land in 2.6.1, but having tested this,
it does not seem to work (yet). (apache/airflow#31401)
@eladkal eladkal added the type:bug-fix Changelog: Bug Fixes label Jun 8, 2023
@eladkal eladkal added this to the Airflow 2.6.2 milestone Jun 8, 2023
eladkal pushed a commit that referenced this pull request Jun 8, 2023
eladkal pushed a commit that referenced this pull request Jun 9, 2023
@eladkal eladkal mentioned this pull request Jun 13, 2023
40 of 62 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:scheduler type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants