-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Core: Fix channelOptions for serverChannel #23615
Conversation
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.
The change looks good, but can we add a test for this? Maybe in a follow-up PR if this is an urgent problem.
How would you imagine I test this @JReinhold ? An unit-test seems kinda not-useful?, a e2e test is going to be a pain to setup (this is only really a thing in dev-mode). |
My instinct was a unit test that mocks the socket, sends an event with a class/function that would have broken it, and see that what was actually sent is the correct thing. But I don't know enough about the context, maybe that is not useful or too complex compared to what it tests. I can see how e2e or chromatic would be very hard in our current testing infrastructure. |
I'd be happy to add such a test. |
We're testing that the channel doesn't break on classes/functions, regardless of which implementation it uses internally. So right now that would be ensuring that we keep setting those options and not remove them during a refactor. In 2 years time when for some reason we refactor to using another library than telejson, these tests would ensure that it still works. |
Thank you guys - really looking forward to this fix since it's causing Storybook to crash on my teams machines. If there's any testing I can help with I'm totally available. |
…-options Core: Fix channelOptions for serverChannel (cherry picked from commit 46a96b3)
…-options Core: Fix channelOptions for serverChannel (cherry picked from commit 46a96b3)
…-options Core: Fix channelOptions for serverChannel (cherry picked from commit 46a96b3)
…-options Core: Fix channelOptions for serverChannel (cherry picked from commit 46a96b3)
…-options Core: Fix channelOptions for serverChannel (cherry picked from commit 46a96b3)
…-options Core: Fix channelOptions for serverChannel (cherry picked from commit 46a96b3)
…-options Core: Fix channelOptions for serverChannel (cherry picked from commit 46a96b3)
…-options Core: Fix channelOptions for serverChannel (cherry picked from commit 46a96b3)
…-options Core: Fix channelOptions for serverChannel (cherry picked from commit 46a96b3)
…-options Core: Fix channelOptions for serverChannel (cherry picked from commit 46a96b3)
Closes storybookjs/telejson#99
What I did
I noticed the error was caused by the serverChannel trying to parse functions and classes.
I'll continue to investigate why they are being sent.
It's orphaned by #9867
I can remove this for the serverChannel.
How to test
dist
fromcore-server
after applying this fix.Checklist
MIGRATION.MD
Maintainers
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
["cleanup", "BREAKING CHANGE", "feature request", "bug", "build", "documentation", "maintenance", "dependencies", "other"]
🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/core
team here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>