plotly / plotly/dash

requestQueue get stuck when browser is experiencing intensive navigation

Offen
#992 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug P3 regression
Vorherrschende Sprache
Python
Sterne
24.4k
Forks
2.3k
Ø Merge
2 T. 7 Std.
Gemergte PRs (30 T.)
13

Beschreibung

Thank you so much for helping improve the quality of Dash!

We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.

Describe your context
Please provide us your environment so we can easily reproduce the issue.

  • replace the result of pip list | grep dash below
dash                            1.5.1     
dash-auth                       1.2.0
dash-bio                        0.1.4
dash-bio-utils                  0.0.3rc3
dash-canvas                     0.0.11
dash-core-components            1.4.0
dash-cytoscape                  0.0.5
dash-dangerously-set-inner-html 0.0.2
dash-daq                        0.2.1
dash-flow-example               0.0.5
dash-html-components            1.0.1
dash-renderer                   1.2.0
dash-table                      4.5.0
plotly                          3.3.0
  • if frontend related, tell us your Browser, Version and OS

    • OS: [Mac OS]
    • Browser [Chrome]
    • Version [77]

Describe the bug

This is kind of reproducible with the current dash-docs PR for 1.5.1 upgrade, but we don't have fixed steps to reproduce it each time.

To give a little background about issue. We introduced a new feature/parameter in the visit_and_snapshot API, what it does is to detect if window.store exists and makes sure all
the callbacks get fired and have a responseTime in the queue (refer to https://github.com/plotly/dash/blob/b3b9de9923d82ff1281889b3695d638e95bb1590/dash/testing/dash_page.py#L43-L48)

this mechanism works fine with the older dash version prior to the 1.5.x release. so the behavior is new. what I observed is that the tests in test_component.py are doing intensively url navigation in the browser, it basically goes through each sub section of dash docs in a very fast way, at some point, the request will get stuck with status = 'loading', a refresh of the page might solve the issue, but not always the case. the stuck point is always consistent on CircleCI and in a local setup. but not the same in the these two environments: i.e. circleci get stuck with /datatables/callbacks while local run might be /datatables/editable

this looks like a leak or something related to the recent async work

sample of a loading state https://circleci.com/api/v1.1/project/github/plotly/dash-docs/8326/output/106/0?file=true
DEBUG dash.testing.dash_page:dash_page.py:48 status of state rq [{u'status': 200, u'requestTime': 1572637143419, u'uid': u'ba5537d0-617e-8488-94b8-0743ae70833e', u'controllerId': u'chapter.children', u'rejected': False, u'responseTime': 1572637143451}, {u'status': 200, u'requestTime': 1572637143564, u'uid': u'ffd418a2-6583-0b41-68e1-f87978e29b89', u'controllerId': u'datatable-paging.data', u'rejected': False, u'responseTime': 1572637144000}, {u'status': 200, u'requestTime': 1572637143625, u'uid': u'00824a87-cc96-bd10-14e8-47c488901e4f', u'controllerId': u'table-paging-with-graph.data', u'rejected': False, u'responseTime': 1572637144090}, {u'status': u'loading', u'controllerId': u'table-sorting-filtering.data', u'uid': u'2dd02b0a-e358-ac9f-24c1-66289dbd0643', u'requestTime': 1572637143676}, {u'status': u'loading', u'controllerId': u'table-filtering.data', u'uid': u'511a97fc-603d-7a33-49dd-343365d2e978', u'requestTime': 1572637143719}, {u'status': u'loading', u'controllerId': u'table-paging-and-sorting.data', u'uid': u'4680495b-ed49-5470-089c-cc8927d40451', u'requestTime': 1572637143766}, {u'status': u'loading', u'controllerId': u'datatable-paging-page-count.data', u'uid': u'0f143cab-e84b-05bb-befb-05d20eb61c83', u'requestTime': 1572637143824}, {u'status': u'loading', u'controllerId': u'datatable-paging-page-count.page_count', u'uid': u'cdfd9b8e-5619-35d0-a1a3-f4a844dc8f92', u'requestTime': 1572637143872}, {u'status': u'loading', u'controllerId': u'table-multicol-sorting.data', u'uid': u'e086324e-52c1-44ac-aeae-84f308e2508b', u'requestTime': 1572637143918}, {u'status': 200, u'requestTime': 1572637144762, u'uid': u'd85d3baf-7a61-d324-b09a-6c7efc6485c0', u'controllerId': u'table-paging-with-graph-container.children', u'rejected': False, u'responseTime': 1572637145068}]

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit test_component.py und der visit_and_snapshot-Logik in dash/testing/dash_page.py um die Zeilen 43-48. Führe die Komponententests mit intensiver URL-Navigation aus und untersuche die Zustände der Request-Warteschlange, insbesondere Requests, die weiterhin geladen werden. Als abgeschlossen gilt die Aufgabe, wenn die Tests zuverlässig abgeschlossen werden, ohne dass Callbacks im Ladezustand verbleiben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
testing-qa
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.