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

Ignore storybookBuildDir property for VTA builds #324

Conversation

ghengeveld
Copy link
Member

VTA doesn't support prebuilt Storybooks, because there's no way to trigger a rebuild when starting a VTA build through Storybook. Using storybookBuildDir would cause VTA to run against the exact same prebuilt Storybook each time, which isn't expected. Therefore, this updates the config overrides to unset storybookBuildDir.

@ghengeveld ghengeveld added skip-release Auto: Preserve the current version when merged minor Auto: Increment the minor version when merged labels Jun 27, 2024
@ndelangen
Copy link
Member

I think this makes sense. I assume VTA will complain when there's no storybookBuildScript it can run at all?

@yannbf
Copy link
Contributor

yannbf commented Jun 28, 2024

I think this change would only make sense if the user understand what is happening. If this silently fails it's not so great!

@ndelangen
Copy link
Member

The status quo is that VTA keeps publishing the same storybook, right? That's even worse.

What makes you think this will silently fail?
I'd assume it would fail hard is it can't build storybook.

(if the command is unknown, it will try a default, AFAIK)

@ghengeveld
Copy link
Member Author

ghengeveld commented Jun 28, 2024

VTA defers to the Chromatic CLI, which has various config checks in place, so that's covered. It doesn't silently fail if it can't build the Storybook, it'll show a notification and refer to the Storybook CLI output which will show more details (provided by Chromatic CLI).

It's actually really uncommon to have storybookBuildDir as a config value, usually it would be passed as a flag (--storybook-build-dir) in which case VTA wouldn't be involved. This PR is just to address the edge case of people configuring storybookBuildDir through their chromatic config file, which makes sense for CI but doesn't make sense for VTA.

@ghengeveld ghengeveld merged commit 9424cf2 into main Jun 28, 2024
8 checks passed
@ghengeveld ghengeveld deleted the ghengeveld/323-if-chromaticconfigjson-has-storybookbuilddir-con branch June 28, 2024 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Auto: Increment the minor version when merged skip-release Auto: Preserve the current version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If chromatic.config.json has storybookBuildDir configured, a build is not triggered
3 participants