plotly / plotly/dash

requestQueue get stuck when browser is experiencing intensive navigation

Aperta
#992 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug P3 regression
Lingua principale
Python
Stelle
24.4k
Fork
2.3k
Merge medio
2g 7h
PR unite (30g)
13

Descrizione

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}]

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da test_component.py e dalla logica di visit_and_snapshot in dash/testing/dash_page.py intorno alle righe 43-48. Esegui i test del componente con una navigazione intensiva tra gli URL e ispeziona gli stati della coda delle richieste, in particolare le richieste che rimangono in caricamento. Il lavoro è completato quando i test terminano in modo affidabile senza lasciare callback nello stato di caricamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
testing-qa
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.