Skip to content

test_otel.py::TestOtelIntegration is flaky #52906

Closed

Description

@xBis7

Apache Airflow version

main (development)

If "Other Airflow 2 version" selected, which one?

No response

What happened?

The test class has a 20% failure rate.

https://github.com/xBis7/airflow/actions/runs/16086980198

https://github.com/xBis7/airflow/actions/runs/16087424463

https://github.com/xBis7/airflow/actions/runs/16087596566

I'm attaching a file with the logs

fail_logs.txt

What you think should happen instead?

No response

How to reproduce

I can't reproduce it locally, it's occurring only on the remote CI. It can be reproduced by running the test on the CI on repeat. Increasing execution concurrency makes it more likely to occur. For example, for 10 iterations

max-parallel: 10

Operating System

The CI uses ubuntu-22.04.

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on Jul 5, 2025
  2. boring-cyborg commented on Jul 5, 2025

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  3. added
    area:CI
    on Jul 5, 2025
  4. potiuk commented on Jul 5, 2025

    @potiuk
    Member

    Assigned it to the project .

  5. xBis7 commented on Jul 5, 2025

    @xBis7
    ContributorAuthor

    @potiuk Thank you!

  6. potiuk commented on Jul 5, 2025

    @potiuk
    Member

    Are you going to mark it as flaky ? If so you can even add comment and link to that issue.

  7. xBis7 commented on Jul 5, 2025

    @xBis7
    ContributorAuthor

    Are you going to mark it as flaky ? If so you can even add comment and link to that issue.

    I'm trying to fix it. If it takes longer than expected then I'll mark it as flaky.

  8. xBis7 commented on Jul 6, 2025

    @xBis7
    ContributorAuthor

    I've concluded that the issue is with the 2nd test, test_scheduler_change_after_the_first_task_finishes.

    The test

    • uses 2 schedulers
    • pauses the 1st scheduler thread so that the 2nd will pick up processing the dag_run
    • once the dag_run has finished, it resumes the paused scheduler to check that it makes the needed updates to the db

    Once that fails, then the rest fail as well. After commenting it out, there are no more failures.

    40/40 successful executions where there used to be 12-15 failures in 40 runs.

    https://github.com/xBis7/airflow/actions/runs/16096527407

    https://github.com/xBis7/airflow/actions/runs/16096660040

    https://github.com/xBis7/airflow/actions/runs/16096742809

    https://github.com/xBis7/airflow/actions/runs/16096823166

  9. xBis7 commented on Jul 6, 2025

    @xBis7
    ContributorAuthor

    During these failures, the paused scheduler thread never comes back.

  10. xBis7 commented on Jul 6, 2025

    @xBis7
    ContributorAuthor

    I've opened a PR with a fix. For more info, check the PR description.

  11. potiuk commented on Jul 6, 2025

    @potiuk
    Member

    I've opened a PR with a fix. For more info, check the PR description.

    Merged. Let's see. Thanks for the super-quick and in-depth analysis and fix!

  12. xBis7 commented on Jul 6, 2025

    @xBis7
    ContributorAuthor

    Thank you!

  13. xBis7 commented on Aug 15, 2025

    @xBis7
    ContributorAuthor

    I haven't seen this occur again. Therefore, I'm assuming that it has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:CIarea:corekind:bugneeds-triage

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions