Skip to content

Build: Lower the number of parallel dts bundle generation at prod#33866

Merged
yannbf merged 2 commits into
nextfrom
norbert/make-dts-prod-builds-less-flaky
Feb 18, 2026
Merged

Build: Lower the number of parallel dts bundle generation at prod#33866
yannbf merged 2 commits into
nextfrom
norbert/make-dts-prod-builds-less-flaky

Conversation

@ndelangen
Copy link
Copy Markdown
Member

@ndelangen ndelangen commented Feb 18, 2026

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

Caution

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-storybook/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 publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Chores
    • Updated build script parameters.

@ndelangen ndelangen force-pushed the norbert/make-dts-prod-builds-less-flaky branch from 7aa06a3 to 57db076 Compare February 18, 2026 11:37
@ndelangen ndelangen changed the title lower the number of parallel dts bundle generation at prod Build: Lower the number of parallel dts bundle generation at prod Feb 18, 2026
@ndelangen ndelangen self-assigned this Feb 18, 2026
@ndelangen ndelangen added build Internal-facing build tooling & test updates ci:normal labels Feb 18, 2026
@ndelangen ndelangen marked this pull request as ready for review February 18, 2026 12:47
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Feb 18, 2026

View your CI Pipeline Execution ↗ for commit 9f221dc

Command Status Duration Result
nx run-many -t compile,check,knip,test,pretty-d... ❌ Failed 11m 34s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-18 13:00:32 UTC

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 18, 2026

📝 Walkthrough

Walkthrough

The build script for DTS (declaration file) generation has been modified to reduce the concurrency limit for parallel TypeScript declaration processing from 10 to 5 child processes. A minor formatting adjustment to an else-if condition was also made.

Changes

Cohort / File(s) Summary
Build Utilities
scripts/build/utils/generate-types.ts
Reduced concurrent DTS generation processes from 10 to 5, and added formatting space in else-if condition.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

✨ Finishing Touches
  • 📝 Generate docstrings

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/build/utils/generate-types.ts (1)

20-24: ⚠️ Potential issue | 🟡 Minor

Stale comment: value mismatch between comment and code.

The comment on lines 22-23 states the limit is 3 ("by trial and error, 3 seems to be the sweet spot"), but the code sets limit(5). Please update the comment to reflect the actual value.

📝 Proposed fix
   // Spawn each entry in it's own separate process, because they are slow & synchronous
   // ...this way we do not bog down the main process/esbuild and can run them in parallel
-  // we limit the number of concurrent processes to 3, because we don't want to overload the host machine
-  // by trial and error, 3 seems to be the sweet spot between perf and consistency
+  // we limit the number of concurrent processes to 5, because we don't want to overload the host machine
+  // by trial and error, 5 seems to be the sweet spot between perf and consistency
   const limited = limit(5);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/build/utils/generate-types.ts` around lines 20 - 24, Update the stale
inline comment above the concurrency limiter to match the actual value used:
change the sentence that says "by trial and error, 3 seems to be the sweet spot"
to reference 5 (or otherwise state "5" as the configured concurrency), so the
comment correctly describes the variable assignment where limited is created
with limit(5); ensure the comment around limited/limit(5) is consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@scripts/build/utils/generate-types.ts`:
- Around line 20-24: Update the stale inline comment above the concurrency
limiter to match the actual value used: change the sentence that says "by trial
and error, 3 seems to be the sweet spot" to reference 5 (or otherwise state "5"
as the configured concurrency), so the comment correctly describes the variable
assignment where limited is created with limit(5); ensure the comment around
limited/limit(5) is consistent.

@storybook-app-bot
Copy link
Copy Markdown

Package Benchmarks

Commit: 9f221dc, ran on 18 February 2026 at 12:59:58 UTC

The following packages have significant changes to their size or dependencies:

@storybook/nextjs-vite

Before After Difference
Dependency count 94 92 🎉 -2 🎉
Self size 1.12 MB 1.12 MB 🚨 +36 B 🚨
Dependency size 23.51 MB 22.34 MB 🎉 -1.17 MB 🎉
Bundle Size Analyzer Link Link

@storybook/react-native-web-vite

Before After Difference
Dependency count 126 124 🎉 -2 🎉
Self size 30 KB 30 KB 0 B
Dependency size 24.80 MB 23.62 MB 🎉 -1.17 MB 🎉
Bundle Size Analyzer Link Link

@storybook/react-vite

Before After Difference
Dependency count 84 82 🎉 -2 🎉
Self size 35 KB 35 KB 🎉 -18 B 🎉
Dependency size 21.29 MB 20.12 MB 🎉 -1.17 MB 🎉
Bundle Size Analyzer Link Link

@yannbf yannbf merged commit 0b8282d into next Feb 18, 2026
129 of 135 checks passed
@yannbf yannbf deleted the norbert/make-dts-prod-builds-less-flaky branch February 18, 2026 16:28
@github-actions github-actions Bot mentioned this pull request Feb 18, 2026
10 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.

3 participants