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

Logging seems to freeze or break airflow #603

Open
noklam opened this issue Mar 12, 2024 · 6 comments
Open

Logging seems to freeze or break airflow #603

noklam opened this issue Mar 12, 2024 · 6 comments

Comments

@noklam
Copy link
Contributor

noklam commented Mar 12, 2024

Description

Short description of the problem here.

  1. Kedro-Airflow not working with Astrocloud #13 (comment) It was first found that logging is breaking kedro-airflow sometimes, this causing the airflow nodes fail immediately during the execution of first node. The workaround is documented in the link.

  2. A new symptoms seem to be rich is interacting with airflow.
    @DimedS :
    When deploying a Kedro project to Airflow using Astronomer, as detailed in this manual, an issue was encountered where the first node would fail after a few minutes, culminating in a {task_context_logger.py:104} ERROR - Detected zombie job error message.

The problem was resolved by modifying the logging.yml file to utilize custom logging settings.
from

root:
  handlers: [rich, info_file_handler]

to

root:
  handlers: [console]
Screenshot 2024-03-12 at 12 23 12

Context

How has this bug affected you? What were you trying to accomplish?

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [And so on...]

Expected Result

Tell us what should happen.

Actual Result

Tell us what happens instead.

-- If you received an error, place it here.
-- Separate them if you have more than one.

Your Environment

Include as many relevant details about the environment in which you experienced the bug:

  • Kedro version used (pip show kedro or kedro -V):
  • Kedro plugin and kedro plugin version used (pip show kedro-airflow):
  • Python version used (python -V):
  • Operating system and version:
@astrojuanlu
Copy link
Member

astrojuanlu commented Mar 12, 2024

The pressure is mounting to do tackle kedro-org/kedro#2928

@astrojuanlu
Copy link
Member

Also I'm almost sure I've been affected by this and the only workaround I found was using a Dockerized version of Airflow instead of the pip install I tried initially.

@noklam noklam changed the title Logging seems to break kedro-airflow sometimes Logging seems to freeze or break airflow Mar 12, 2024
@noklam
Copy link
Contributor Author

noklam commented Mar 12, 2024

@astrojuanlu Do you know why would a dockerized version help? Good to know this as a workaround though.

@noklam
Copy link
Contributor Author

noklam commented Mar 12, 2024

The pressure is mounting to do tackle kedro-org/kedro#2928

This may solve problem 2, but not 1 (not sure if it still persists), from experience it also depends on the airflow version. I tried to look at both rich or airflow Github repo and couldn't find any related problem, is it worth to do some investigation to see if this is an issue created by Kedro instead?

@em-pe
Copy link

em-pe commented Apr 19, 2024

@noklam Not sure how much of help this would be but I managed to fix both of the issues disabling kedro logging at all by commenting out following line.

rich made the pipelinie stuck and "disable_existing_loggers": True made the configure_project fail with -1 error code and no error logs. When you disable logging changes done by kedro everything seems to work fine, including logging information from airflow tasks.

@noklam
Copy link
Contributor Author

noklam commented Apr 19, 2024

@em-pe I think you are right I found that previously though the root cause is still unknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants