fix: pin Yarn version from packageManager field in remaining build scripts#10175
Conversation
…ripts pgadmin-org#10156 fixed CI build failures caused by Yarn 4.x fetching a newer patch with different builtin compat hashes, breaking --immutable lockfile validation, but only patched pkg/linux/build-functions.sh and the GHA workflows. Make.bat, pkg/mac/build-functions.sh, pkg/pip/build.sh, and Dockerfile still hardcoded 'yarn set version 4', which is what broke the Windows Jenkins snapshot build (job 1669).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughBuild configuration now derives Yarn versions from ChangesYarn version configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Make.bat`:
- Around line 224-230: Clear YARN_VERSION immediately before the web-version
extraction in Make.bat lines 224-230 and again before the runtime-version
extraction in Make.bat lines 284-290. Preserve the existing empty-value
validation so each build phase fails instead of reusing a stale version from the
previous phase.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 64bc5f41-198f-4d63-82dd-71df03d1d9db
📒 Files selected for processing (4)
DockerfileMake.batpkg/mac/build-functions.shpkg/pip/build.sh
Batch variables persist for the life of the script. Without resetting YARN_VERSION before the second FOR /f, a failed node lookup in the runtime phase would silently fall through to the stale value set by the earlier web phase instead of tripping the empty-value check.
Summary
--immutablelockfile validation, but only patchedpkg/linux/build-functions.shand the GitHub Actions workflows.Make.bat,pkg/mac/build-functions.sh,pkg/pip/build.sh, andDockerfilestill hardcodedyarn set version 4, which is what caused the Windows Jenkins snapshot build to fail (jobpgadmin4-windows-x64-snapshotFix PEP-8 issues in various modules (RM #3121) #1669,The lockfile would have been modified by this install, which is explicitly forbidden.).package.jsonpackageManagerfield instead of hardcoding a major version.Test plan
Summary by CodeRabbit
package.jsonpackageManagerfield instead of a fixed Yarn version.