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

Build: Fixes to enable vite-ecosystem-ci #28838

Merged
merged 4 commits into from
Aug 9, 2024

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Aug 8, 2024

Closes #

What I did

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 76.3 MB 76.3 MB 0 B -1.49 0%
initSize 167 MB 167 MB 0 B -1.03 0%
diffSize 91.1 MB 91.1 MB 0 B -1.03 0%
buildSize 7.42 MB 7.42 MB 0 B -0.5 0%
buildSbAddonsSize 1.61 MB 1.61 MB 0 B -0.5 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.29 MB 2.29 MB 0 B - 0%
buildSbPreviewSize 351 kB 351 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.45 MB 4.45 MB 0 B -0.5 0%
buildPreviewSize 2.97 MB 2.97 MB 0 B -0.5 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 17.5s 6.1s -11s -408ms -2.65 🔰-186%
generateTime 19.1s 18.6s -415ms -1.1 -2.2%
initTime 16.4s 15.5s -885ms -1.8 🔰-5.7%
buildTime 11.7s 14.2s 2.4s 1.02 17%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 7s 7.9s 932ms -0.43 11.7%
devManagerResponsive 4.4s 4.7s 252ms -0.9 5.3%
devManagerHeaderVisible 700ms 771ms 71ms -0.58 9.2%
devManagerIndexVisible 731ms 821ms 90ms -0.41 11%
devStoryVisibleUncached 1.2s 1.4s 254ms 1.03 17.4%
devStoryVisible 752ms 834ms 82ms -0.49 9.8%
devAutodocsVisible 738ms 696ms -42ms -0.62 -6%
devMDXVisible 611ms 678ms 67ms -0.6 9.9%
buildManagerHeaderVisible 693ms 760ms 67ms -0.27 8.8%
buildManagerIndexVisible 696ms 763ms 67ms -0.31 8.8%
buildStoryVisible 734ms 805ms 71ms -0.31 8.8%
buildAutodocsVisible 678ms 653ms -25ms -0.87 -3.8%
buildMDXVisible 612ms 642ms 30ms -0.56 4.7%

Greptile Summary

The pull request addresses issues related to the Vite ecosystem CI by updating scripts and components for better compatibility and functionality.

  • code/addons/docs/template/stories/toc/basic.stories.ts: Added fn import from @storybook/test to support Vite ecosystem CI.
  • code/renderers/react/template/components/Pre.jsx: Refactored to set default values in function parameters, removing defaultProps.
  • package.json: Updated vite-ecosystem-ci:build script to include --start-from=install flag for dependency setup.
  • scripts/tasks/test-runner-build.ts: Commented out --failOnConsole flag to prevent test runner failures due to console errors.
  • scripts/vite-ecosystem-ci/before-test.js: Added Playwright installation commands to ensure proper testing environment setup.

@valentinpalkovic valentinpalkovic changed the title WIP Build: Fixes to enable vite-ecosystem-ci Aug 8, 2024
@valentinpalkovic valentinpalkovic added the build Internal-facing build tooling & test updates label Aug 8, 2024
Copy link

nx-cloud bot commented Aug 8, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 688044c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@yannbf yannbf marked this pull request as ready for review August 8, 2024 14:01
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

@@ -26,3 +27,6 @@ sandboxPackageJson.resolutions = {
};

await fs.promises.writeFile(sandboxPackageJsonPath, JSON.stringify(sandboxPackageJson, null, 2));
const sandboxFolder = path.dirname(sandboxPackageJsonPath);
await execa('yarn add playwright', { cwd: sandboxFolder, shell: true });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider wrapping the Playwright installation commands in a try/catch block to handle potential errors gracefully.

@valentinpalkovic valentinpalkovic merged commit edd0fd5 into next Aug 9, 2024
53 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/fix-for-vite-ecosystem-ci branch August 9, 2024 08:20
@github-actions github-actions bot mentioned this pull request Aug 9, 2024
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants