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

CLI: Parse more Yarn Berry errors #28816

Merged
merged 1 commit into from
Aug 6, 2024
Merged

CLI: Parse more Yarn Berry errors #28816

merged 1 commit into from
Aug 6, 2024

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Aug 6, 2024

Closes #

What I did

There were some common errors that were happening and excluded from parsing which we should just include. This will make the reports as useful as possible.

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 -0.09 0%
initSize 172 MB 172 MB -600 B -1.53 0%
diffSize 95.7 MB 95.7 MB -600 B -1.53 0%
buildSize 7.6 MB 7.6 MB 0 B -0.53 0%
buildSbAddonsSize 1.64 MB 1.64 MB 0 B 0.82 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.29 MB 2.29 MB 0 B -1.53 0%
buildSbPreviewSize 351 kB 351 kB 0 B 0.82 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.47 MB 4.47 MB 0 B -1.11 0%
buildPreviewSize 3.13 MB 3.13 MB 0 B 1.7 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 23.7s 6.5s -17s -164ms -1.15 -260.8%
generateTime 23.3s 19.9s -3s -345ms -1.69 🔰-16.7%
initTime 21.4s 17.9s -3s -478ms -1.75 🔰-19.4%
buildTime 12.3s 13.5s 1.1s -0.47 8.2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 11.2s 8.8s -2s -420ms 0.03 -27.5%
devManagerResponsive 6.3s 5.5s -867ms -0.1 -15.7%
devManagerHeaderVisible 937ms 1s 68ms 1.07 6.8%
devManagerIndexVisible 978ms 1s 31ms 0.85 3.1%
devStoryVisibleUncached 1.3s 1.4s 24ms 0.46 1.7%
devStoryVisible 1s 1s 58ms 0.97 5.5%
devAutodocsVisible 766ms 793ms 27ms 0.27 3.4%
devMDXVisible 904ms 832ms -72ms 0.97 -8.7%
buildManagerHeaderVisible 788ms 831ms 43ms 0.27 5.2%
buildManagerIndexVisible 799ms 837ms 38ms 0.27 4.5%
buildStoryVisible 858ms 885ms 27ms 0.23 3.1%
buildAutodocsVisible 796ms 784ms -12ms 0.74 -1.5%
buildMDXVisible 716ms 779ms 63ms 1 8.1%

Greptile Summary

This PR enhances error handling for Yarn Berry in the Storybook CLI by expanding the list of critical error codes and improving error parsing.

  • Added more error codes to CRITICAL_YARN2_ERROR_CODES in Yarn2Proxy.ts
  • Updated parseErrorFromLogs method to handle new error codes and provide more detailed messages
  • Modified Yarn2Proxy.test.ts to include tests for new error parsing functionality
  • Improved error reporting for common issues like missing peer dependencies and conflicting dependencies

@yannbf yannbf added bug cli patch:yes Bugfix & documentation PR that need to be picked to main branch labels Aug 6, 2024
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.

LGTM

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

nx-cloud bot commented Aug 6, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 4ca1752. 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 2 targets

Sent with 💌 from NxCloud.

@yannbf yannbf merged commit c0d3fdf into next Aug 6, 2024
57 of 58 checks passed
@yannbf yannbf deleted the yann/improve-yarn-errors branch August 6, 2024 15:35
yannbf added a commit that referenced this pull request Aug 7, 2024
CLI: Parse more Yarn Berry errors
(cherry picked from commit c0d3fdf)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ci:normal cli patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants