-
Notifications
You must be signed in to change notification settings - Fork 995
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
fix: check no "ERR!" string is in stderr when running Storybook build #3509
fix: check no "ERR!" string is in stderr when running Storybook build #3509
Conversation
Avoid false positive Seems stderr is used for info as well as error see: https://github.com/redwoodjs/redwood/runs/3799459178?check_suite_focus=true
hope to avoid `Cannot read properties of undefined (reading 'split')` see: https://github.com/redwoodjs/redwood/runs/3802028363?check_suite_focus=true
Ok, I'm following you here and the Cypress changes are really helpful to see (I personally am not very experienced with Cypress outside this project).Bare with me as I walk through a thought process that got us here. This is all just fwiw exploration. I'm game to punt on further exploration and just merge this as is. False positives and false negatives == why even try 🤷♂️Admittedly this is a hacky, brittle way to test Storybook. It's actually my hack, inspired by the facts 1) we don't have a way to both start and stop a Storybook process using Cypress in this manner (also, resource constraints) and 2) we already have So we run into scenarios like this one, where the Storybook spec is failing, but yet it's not really failing. When I run SB --build locally
And even in the output from #3508 there were no Errors in the stderr: Sanity check --> are you seeing something different locally and in the CI runs? Maybe there's a Storybook error buried in there somewhere that needs to be resolved. (But in that case I don't understand why this one is passing...?) So why was the spec failing?We've ended up assuming that failures like this are just resource constraints and can't be resolved until we rewrite tests for these cases using something other than Cypress.
But maybe what you're doing here is resolving an issue we had with the I don't know Cypress well enough to know. But given that this is passing, do you think there's actually an improvement beyond error capture? An alternate testOriginally, we just wanted to check if At one time I looked into using I didn't finish it because I never worked through how to "capture" the output to check in Cypress. I'll defer to you, but would you be interested in exploring a full replacement of this current Storybook spec with a way to use Note: you can try this locally by passing the path to the Storybook config you see when you run
|
Yes, that interests me. I do advocate in the short term we go with this fix as "hacky" as it is. There is still some value in the checks as they are. I opened #3511 to illustrate how this change might surface actual build errors. |
chore: take in changes from redwoodjs#3509 to illustrate build failures
Agreed! Merging now (and letting my original hack continue to propagate). Will continue discussion in #3511 |
Avoid false positive. It seems
stderr
contains info as well as error, so just checking if it is''
will not work.See Also:
stderr
check to Storybook build #3508cc: @thedavidprice
note: while #3154 looks to fix the "connection time out" error we were seeing in CI checks; speaking from experience, there still can be inadvertent regressions added to the CI when upgrading Storybook, or other "unrelated" dependencies. This PR ( and #3508 even though the check was wrong ) makes sure that if there are build errors output, the
stderr
is surfaced to the CI so that maintainers can more easily see the potential issue.