GeezerVison is showing github.com — fix: pin Yarn version from packageManager field in build scripts by asheshv · Pull Request #10156 · pgadmin-org/pgadmin4
Conversation
asheshv
commented
Jul 16, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- Replace hardcoded
yarn set version 4 in pkg/linux/build-functions.sh with a dynamic lookup from each workspace's packageManager field in package.json
- Sync
runtime/package.json Yarn version to 4.15.0 to match web/package.json
Root Cause
CI DEB build (#1708) failed with YN0028 — yarn install ran with --immutable but the lockfile would have been modified. The build script ran yarn set version 4 which fetched the latest Yarn 4.x release; that newer Yarn recomputes builtin compat patch hashes differently from the version used to generate the committed lockfile.
Fix
YARN_VERSION=$(node -p "require('./package.json').packageManager.split('@')[1]")
yarn set version "${YARN_VERSION}"
Both the web and runtime build blocks now use the version declared in their respective package.json. The build script never needs updating when Yarn is bumped — the single source of truth is packageManager.
Test plan
- Trigger DEB snapshot build on CI and confirm
yarn install passes
- Confirm RPM/other Linux builds unaffected (same
build-functions.sh)
Summary by CodeRabbit
-
Chores
- Updated the project’s expected Yarn version to 4.15.0 via the runtime package configuration.
- Desktop runtime and web/server bundling now automatically use the Yarn version declared in the project configuration, with validation to prevent empty version selection.
-
CI
- CI “Upgrade yarn” steps now derive the Yarn version from the web package configuration instead of using hard-coded Yarn versions, keeping JavaScript checks and test runs consistent.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Replace hardcoded 'yarn set version 4' in build-functions.sh with a
dynamic lookup from each workspace's package.json packageManager field.
Also syncs runtime yarn version to 4.15.0 to match web/package.json.
Fixes CI build failures caused by Yarn 4.x fetching a newer patch that
produces different builtin compat hashes, breaking --immutable lockfile
validation.
coderabbitai
Bot
commented
Jul 16, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1d7a8fd6-3e22-415d-be53-de51c55d56e5
📥 Commits
Reviewing files that changed from the base of the PR and between 1a88a77 and 07eb1de.
📒 Files selected for processing (1)
pkg/linux/build-functions.sh
🚧 Files skipped from review as they are similar to previous changes (1)
- pkg/linux/build-functions.sh
Walkthrough
The runtime now declares Yarn 4.15.0. Linux build steps and JavaScript-related CI workflows derive Yarn versions from package metadata instead of using hard-coded versions.
Changes
Yarn version alignment
| Layer / File(s) |
Summary |
Declared Yarn version and build integration runtime/package.json, pkg/linux/build-functions.sh |
The runtime package declares Yarn 4.15.0, while desktop and web/server build steps extract, validate, and apply the declared Yarn version using Node and yarn set version. |
CI workflow Yarn integration .github/workflows/check-javascript-style.yml, .github/workflows/run-feature-tests-epas.yml, .github/workflows/run-feature-tests-pg.yml, .github/workflows/run-javascript-tests.yml |
JavaScript style, feature-test, and JavaScript-test workflows derive the Yarn version from web/package.json before continuing their existing tasks. |
Estimated code review effort: 2 (Simple) | ~10 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name |
Status |
Explanation |
| Description Check |
✅ Passed |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
✅ Passed |
The title accurately summarizes the main change: deriving Yarn version from packageManager in build scripts. |
| Docstring Coverage |
✅ Passed |
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check |
✅ Passed |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
✅ Passed |
Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
📝 Generate docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
fix/yarn-version-pin
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.
❤️ Share
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pkg/linux/build-functions.sh (1)
260-261: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win
Align the remaining web test workflow with the declared Yarn version.
.github/workflows/run-javascript-tests.yml still runs yarn set version 4 before installing web, so CI can test with a different Yarn version than this packaging path. If version alignment is intended across build and test flows, derive the version from web/package.json there as well.
🤖 Prompt for 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.
In `@pkg/linux/build-functions.sh` around lines 260 - 261, Update the web test
workflow’s Yarn setup to derive the version from web/package.json’s
packageManager field, matching the existing YARN_VERSION logic in the packaging
path, instead of hardcoding Yarn 4 before installing web.
🤖 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 `@pkg/linux/build-functions.sh`:
- Around line 212-213: Validate YARN_VERSION immediately after extracting it in
the build flow around the packageManager parsing command, ensuring the
packageManager field exists, identifies Yarn, and yields a non-empty valid
version before calling yarn set version. Fail fast with an appropriate error
when validation fails, and apply the same validation to the corresponding second
occurrence.
---
Nitpick comments:
In `@pkg/linux/build-functions.sh`:
- Around line 260-261: Update the web test workflow’s Yarn setup to derive the
version from web/package.json’s packageManager field, matching the existing
YARN_VERSION logic in the packaging path, instead of hardcoding Yarn 4 before
installing web.
🪄 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
Run ID: b8d3cfc5-57ee-4aea-92f8-33e3cea82aad
📥 Commits
Reviewing files that changed from the base of the PR and between dfc4ef3 and 8ae478c.
📒 Files selected for processing (2)
pkg/linux/build-functions.sh
runtime/package.json
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
asheshv
added a commit
that referenced
this pull request
Jul 23, 2026
…ripts (#10175)
#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).
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|