-
Notifications
You must be signed in to change notification settings - Fork 946
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
Kernel is the source of truth: support multiple clients and fixes out of sync bug #3195
Kernel is the source of truth: support multiple clients and fixes out of sync bug #3195
Conversation
In our dev meeting today, we were discussing this, and whether it should be a target for 8.0, or whether it should be tackled in the (hopefully upcoming) explorations in moving the syncing to a real-time collaboration backend. |
In the dev meeting today, we propose moving this to 9.0 with the (hopefully upcoming) move to an RTC framework for syncing data. Maarten, what do you think? |
Moving to Future (e.g., 9.0) since there was no follow-up. Maarten, if you'd like to discuss this more, please comment. We can always move it back if that's what everyone decides. |
I think that makes sense! |
As described in jupyter-widgets#3111 it can happen that a frontend can get out of sync due to not echoing back messages from the frontend. Widgets can opt out of this behaviour if it is too costly and/or does not make sense, e.g. the data from the file widget. Fixes jupyter-widgets#3111
eaf9a4f
to
7466482
Compare
This poses an issue in the following situation:
We have seen this bug make slider handles jitter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per my last comment.
We can see this from the parent header, if we get an update from the kernel, where the parent header |
a50e5e1
to
cf972d2
Compare
722944a
to
3808d7d
Compare
with the env var |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This protocol change should be documented in https://github.com/jupyter-widgets/ipywidgets/blob/master/packages/schema/messages.md#widget-messaging-protocol-version-2. Since it is backwards compatible, perhaps we bump the protocol version to 2.1?
Note from @jasongrout: |
@maartenbreddels @jasongrout @ibdafna was there a final decision to go ahead and merge after I left the call? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested running of the code, but AFAICT this code now meets all the targets we said we needed for including this in the RC
On things that were not a prerequisite for inclusion in the RC, but I would consider a prerequisite for release the final version with this on as the default: I think that we should make sure we have tests that properly cover the cases where the previous property lock prevented flickering of values to occur. I'm uncertain if the new code properly handles all of the corner cases there, and more regression tests would go a long way in acting as a proof of that. |
@SylvainCorlay I believe we agreed to merge, release a new beta tomorrow, and for @maartenbreddels to add documentation about the changes this PR introduces, before releasing a new RC in the new year. |
Yes, we spent an hour this morning trying to break it, both by inspecting the code and trying different scenarios. |
Merged! |
I thought we had decided to document this in the widget protocol (i.e., #3195 (review)), then merge. I do think it is important to document this before releasing a release with it, since it is big enough change (especially with default on). |
I've opened #3330 to track the documentation and protocol version changes. |
@jasongrout apologies for the mixup. @maartenbreddels will wait for a PR with documentation changes before releasing |
No problem. We could also just cut the beta from just before the merge commit (i.e., branch off, do the beta release from the branch and tag it there, then merge back into master). |
@jasongrout will do that! |
This backports the combination of jupyter-widgets#3195 and jupyter-widgets#3394.
This backports the combination of jupyter-widgets#3195 and jupyter-widgets#3394.
This copies the test_set_state file from before jupyter-widgets#3195 to make sure that it still works unchanged when disabling echo_update messages.
As described in #3111 it can happen that a frontend can get out of sync
due to not echoing back messages from the frontend.
Widgets can opt out of this behaviour if it is too costly and/or does
not make sense, e.g. the data from the file widget.
Fixes #3111