Skip to content
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

Bug: Sandbox versions lag behind because they are only generated daily #25603

Open
Tracked by #25293
JReinhold opened this issue Jan 15, 2024 · 6 comments
Open
Tracked by #25293
Assignees

Comments

@JReinhold
Copy link
Contributor

JReinhold commented Jan 15, 2024

When running npx storybook@next sandbox or npx storybook@latest sandbox, we download the after-storybook directory from the sandbox git repo.
However that repo is only kept up-to-date once a day, meaning that if a new version is released of Storybook, up to 24 hours will pass before that version is generated with the sandbox command.

This has always been like this, but it's now a more apparent issue, because the sandbox CLI will output this:

image

But then in fact generate an alpha.9 sandbox.

One fix would be to trigger sandbox generation at the end of every version publish. We could trigger the GH workflow so it wouldn't block the publish workflow from completing and it wouldn't cause it to fail either.

Should we do this for all releases or only stable releases?

We could also ignore this and accept that it just is like this.

@shilman
Copy link
Member

shilman commented Jan 16, 2024

I wonder if we should just download before-sandbox and install Storybook into it.

@JReinhold
Copy link
Contributor Author

JReinhold commented Jan 17, 2024

I wonder if we should just download before-sandbox and install Storybook into it.

But when @shilman? Always? Because the only way to know if the git repo is behind is to download the after-storybook directory and check the files, which is very late in the process.

That might be okay though, given that this is rare.

@shilman
Copy link
Member

shilman commented Jan 18, 2024

@JReinhold always. this guarantees that we have the latest version of the code & the install script. at this point i don't remember why we were caching this in the first place.

@JReinhold
Copy link
Contributor Author

That's an interesting take. This is also what CI does anyway.

Generating after-storybook sandboxes would still add value so we can keep track of what changes over time. We had this acorn incident a few months back where being able to see how a lock file had changed over time was detrimental to pinpointing which upstream version bump caused the incident.
But that doesn't mean we have to use these after-storybook directories for anything other than history tracking.

I'd like to hear @yannbf's opinion when he's back.

@ndelangen
Copy link
Member

If we only every use the before-storybook, we can skip a lot of work in the generation of the sandbox repo.

@JReinhold we could generate the after-storybook into another repository, if we wanted to preserve that change detection.

@yannbf
Copy link
Member

yannbf commented Jan 23, 2024

Apart from using after-storybook in https://storybook.new, we also used after-storybook for performance sake, given that you'd just download the final project instead of having to install a project without SB and then init, and then install things once again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants