sveltejs / cli

The Svelte CLI
MIT License
258 stars 11 forks source link

fix `storybook` tests on windows in ci #293

Open manuel3108 opened 1 week ago

manuel3108 commented 1 week ago

In #275 we had severe problems with the storybook tests on windows. They were failing with obscure error message while running pnpm dlx storybook@8.3.6. Those failing tests mostly occurred on windows, but from time to time also on ubuntu. Never on mac.

Tests work flawlessly locally on windows; thus we decided to skip them ci for now

JReinhold commented 1 week ago

Let me know if I can assist in any way here.

AdrianGonz97 commented 1 week ago

It's tough to pinpoint the exact issue, but here's some error info we've been able to get: https://github.com/sveltejs/cli/actions/runs/11806879168/job/32892430989?pr=181#step:8:168

AdrianGonz97 commented 1 week ago

@JReinhold

I managed to reduce it down into a minimal repro: https://github.com/AdrianGonz97/storybook-ci-repro

It appears that it doesn't like to run separate processes of storybook init concurrently.

manuel3108 commented 1 week ago

I managed to reduce it down into a minimal repro: https://github.com/AdrianGonz97/storybook-ci-repro

It appears that it doesn't like to run separate processes of storybook init concurrently.

Great. Was also able to reproduce this in a linux based codespace just now!

Edit: Should we try running the storybook test non concurently?

AdrianGonz97 commented 1 week ago

Should we try running the storybook test non concurently?

Already covered in https://github.com/sveltejs/cli/pull/181/files#diff-88b82b064ede32a2332fd0d35f0f01326479ad0ff68248247c513c40838072caR10-R13

manuel3108 commented 1 week ago

Ohh great Since this is also happening on ubuntu from time to time, should we just remove the concurrent tests for storybook altogether?

AdrianGonz97 commented 1 week ago

I think we can just leave it alone for now. If it starts to get annoying again on the other platforms, then we can start considering to only running it sequentially in CI

manuel3108 commented 1 week ago

And for the sake of protocolling it somewhere, this just happend to me for the first time on macOs as well. https://github.com/sveltejs/cli/actions/runs/11843814850/job/33005611663?pr=303

JReinhold commented 1 week ago

Are you okay with fixing it in your CI, not running them concurrently?

Because it doesn't sound like anything a regular user would do (you're probably the first ever to discover this), so sinking time into figuring out the issue on the Storybook side is a hard sell.

AdrianGonz97 commented 1 week ago

Because it doesn't sound like anything a regular user would do (you're probably the first ever to discover this)

Based on the error, there may be a few more folks that ran into this (or something similar) as well: https://github.com/storybookjs/storybook/issues?q=sort%3Aupdated-desc%20is%3Aissue%20is%3Aopen%20Error%3A%20EBUSY%3A%20resource%20busy%20or%20locked

Are you okay with fixing it in your CI, not running them concurrently?

For sure! It's certainly not a dealbreaker since we have a workaround now