Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deterministic duplicate outputs #2479

Merged
merged 5 commits into from
Mar 28, 2023
Merged

Deterministic duplicate outputs #2479

merged 5 commits into from
Mar 28, 2023

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Mar 28, 2023

Duplicate outputs we're inserted with a random uuid, when the server restarted or used with gunicorn multi workers it would have different values for callback ids resulting in KeyError for callbacks.

This PR change the behavior to be deterministic, creating md5 hash from the callback inputs to use in lieu of the uuid4.

Fix #2480

CHANGELOG.md Outdated Show resolved Hide resolved
dash_duo_mp.wait_for_element("#click2").click()
dash_duo_mp.wait_for_text_to_equal("#output", "click 2")

dash_duo_mp.server.stop()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice test!

Copy link
Member

@chriddyp chriddyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃🏼

T4rk1n and others added 2 commits March 28, 2023 13:41
Co-authored-by: Chris Parmer <chris@plot.ly>
@T4rk1n T4rk1n merged commit fde5033 into dev Mar 28, 2023
@T4rk1n T4rk1n deleted the fix-duplicate-outputs branch March 28, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Duplicate callback outputs not working when deployed with gunicorn
2 participants