Skip to content

chore: update Node.js version consistency and optimize Docker build#6285

Merged
yau-wd merged 3 commits into
mainfrom
chore/node-version-docker-build-optimization
Apr 27, 2026
Merged

chore: update Node.js version consistency and optimize Docker build#6285
yau-wd merged 3 commits into
mainfrom
chore/node-version-docker-build-optimization

Conversation

@jocelynlin-wd
Copy link
Copy Markdown
Contributor

@jocelynlin-wd jocelynlin-wd commented Apr 24, 2026

Summary

  • Bump .nvmrc from v20.19.2 to v20.20.2 to match CI
  • Narrow package.json engines from >=18.15.0 <19.0.0 || ^20 to ^20 since everything is now on Node 20
  • Exclude @flowiseai/agentflow and @flowiseai/observe from Docker build — these UI-only SDK packages are not needed for the app runtime, saving ~40–50s per Docker build

FLOWISE-619

Test plan

  • Verify CI passes with Node 20.20.2
  • Verify Docker image builds successfully with the filtered build command

🤖 Generated with Claude Code

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Node.js version to 20.20.2 and modifies the Docker build process to exclude specific UI packages. Feedback suggests that the pnpm build command in the Dockerfile requires a double-dash separator to correctly pass filters to Turbo. Additionally, it is recommended to update the engine constraints in workspace packages, such as the server package, to maintain consistency with the root configuration.

Comment thread Dockerfile Outdated
Comment thread package.json
- Bump .nvmrc from v20.19.2 to v20.20.2 to match CI
- Narrow package.json engines to ^20 across root and packages/server
- Exclude @flowiseai/agentflow and @flowiseai/observe from Docker build
  to save ~40-50s per build (sdk packages not needed for app runtime)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jocelynlin-wd jocelynlin-wd force-pushed the chore/node-version-docker-build-optimization branch from de8940f to ecfa502 Compare April 24, 2026 23:49
@jocelynlin-wd
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Node.js version to 20.20.2 in .nvmrc and restricts the engine requirement to Node 20 in the package configuration files. Additionally, the Dockerfile build command is modified to exclude specific SDK packages using pnpm filters to optimize the build process. I have no feedback to provide.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jocelynlin-wd
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the project's Node.js version to 20.20.2 and introduces a specialized build:docker script that excludes specific SDK packages to optimize the Docker build process. It also simplifies the Node.js engine requirements across the repository. The review feedback suggests relaxing the engine constraint from ^20 to >=20 to ensure compatibility with newer LTS versions, such as Node 22, which improves the developer experience and future-proofs the application.

Comment thread package.json
Comment thread packages/server/package.json
@yau-wd yau-wd merged commit fed53e4 into main Apr 27, 2026
8 of 9 checks passed
@yau-wd yau-wd deleted the chore/node-version-docker-build-optimization branch April 27, 2026 12:20
@HenryHengZJ
Copy link
Copy Markdown
Contributor

@jocelynlin-wd do we plan to also exlucde the new packages from pnpm build ?

@jocelynlin-wd
Copy link
Copy Markdown
Contributor Author

@jocelynlin-wd do we plan to also exlucde the new packages from pnpm build ?

@HenryHengZJ

The exclusion is intentional only for the Docker build. pnpm build keeps building all packages since local dev and CI still need agentflow and observe for testing and publishing. That's why we introduced the separate build:docker script.

@HenryHengZJ
Copy link
Copy Markdown
Contributor

@jocelynlin-wd node20 is deprecated, can we use 24? https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@jocelynlin-wd
Copy link
Copy Markdown
Contributor Author

@jocelynlin-wd node20 is deprecated, can we use 24? https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Yes we need to look into this. Created FLOWISE-629 to handle the Node.js version upgrade.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants