plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.

Home Page:https://plotly.com/dash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Use of `dash_duo` hangs Github Action until Timeout

2Ryan09 opened this issue · comments

Describe your context
Github Action running on ubuntu-latest and unit tests run with:

pytest --capture=no --headless [package]

Result of pip list | grep dash

dash                                             2.15.0
dash_ag_grid                              31.0.1
dash-bootstrap-components     1.6.0
dash-core-components              2.0.0
dash_daq                                     0.5.0
dash-html-components              2.0.0
dash-table                                    5.0.0
dash-testing-stub                        0.0.2

Describe the bug

When running unit tests in Github Actions that involve the use of dash_duo to spin up an instance of the server, the action is left hanging until timeout even after all tests within pass. The final output is the summary from pytest saying all tests passed:

image

Assuming this is due to some background/sub process of selenium not terminating correctly.

Have tried using dash_duo as a content manager, as below, without success.

with dash_duo:
    do_some_test_with_dash_duo()

Expected behavior

The GitHub action to proceed once pytest has terminated.

Hi @2Ryan09 , thanks for reporting this issue.

I haven't been able to reproduce yet -- here's a successful workflow which uses pytest and dash_duo.

Could you share a minimal example which triggers the hang?

Also check what pytest version you are using and see if you can upgrade — the above uses pytest==8.1.2.