-
Notifications
You must be signed in to change notification settings - Fork 73
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
update getStorybookMetadata to safely record version even if fails to parse mainConfig #753
update getStorybookMetadata to safely record version even if fails to parse mainConfig #753
Conversation
… parse mainConfig
AP-2756 Chromatic telemetry reports `null` `storybook_version`
How is the user affected?Our telemetry reports How many and/or what class of users does this impact?Unsure, possible all users, or maybe a specific CLI version / SB version Is there a workaround?Backfill data based on other data. What are the steps for reproducing the issue?Not sure. Other informationRun this query to see the above data (run on Jan 18):
|
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.
OK, LGTM. @zol @thafryer this will mean that in some proportion of cases (it looks like maybe as many as 1/3) where we fail to parse main.js
, we report the SB + CH versions correctly, but we won't have a valid addons list or builder (they'll be "unknown").
In order to investigate further we'll probably need to start uploading the errors we are getting trying to parse the file. That's a bit tricky because we need to sanitize the errors etc. We should consider if we want the data enough to do that.
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.
LGTM. Tests are failing. It's likely because of the tweak to catch block.
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.
LGTM. Tests are failing. It's likely because of the tweak to catch block.
Co-authored-by: Jarel Fryer <[email protected]>
…chromatic-telemetry-reports-null-storybook_version-2
Even though we reproduced, tested, and fixed a mainConfig parsing bug, it is possible that certain formats are still not readable. In that event we want to at least still record the metadata that we can gather.