plotly / plotly/dash

requestQueue get stuck when browser is experiencing intensive navigation

Ouverte
#992 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

bug P3 regression
Langage dominant
Python
Étoiles
24.4k
Forks
2.3k
Merge moyen
2 j 7 h
PR mergées (30 j)
13

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par test_component.py et la logique de visit_and_snapshot dans dash/testing/dash_page.py autour des lignes 43-48. Exécutez les tests du composant avec une navigation intensive entre les URL et examinez les états de la file d’attente des requêtes, en particulier les requêtes qui restent en cours de chargement. C’est terminé lorsque les tests s’exécutent de manière fiable sans que des callbacks restent dans l’état de chargement.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
testing-qa
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.