1
0
mirror of synced 2026-10-24 18:59:25 +03:00
Files
pgadmin4/.github
Dave Page bc58657d3d ci: stop fetching an unpinned Yarn before the pinned one (#10306)
Everywhere we build the JS, we asked Yarn to install itself twice:

    yarn set version berry
    yarn set version <the version from packageManager>

The first call fetches whichever release is "berry" today and the second
immediately replaces it, so every build made two downloads to end up with one
Yarn, and the one that could not be reproduced tomorrow was fetched first.

That first fetch broke CI outright on 17 August 2026, during a GitHub
incident, when it returned an empty body and Yarn 1 died writing it out:

    error TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of
    type string or an instance of Buffer, TypedArray, or DataView
        at writeFile (node:fs:2373:5)

The unpinned call is dropped everywhere it appeared: Make.bat, the macOS and
pip package builds, and the four workflows. The packaging scripts keep their
pinned "yarn set version ${YARN_VERSION}", which still reads packageManager
from package.json, so their behaviour is unchanged beyond losing a download.

The workflows go further and use Corepack, which reads packageManager itself
and provisions exactly that Yarn without writing .yarnrc.yml and
.yarn/releases into the repository root, where the JS project is not. The
Dockerfile already installed and enabled Corepack immediately before both
"set version" calls, so both were redundant there and are simply removed.

CONTRIBUTING.md and README.md already tell contributors to start with
"corepack enable", so this brings the automation in line with the documented
setup. Note that Corepack ships with Node.js only up to (but not including)
25.0.0, so it will need installing explicitly once the runners move past it,
as the Dockerfile already does.
2026-08-21 18:39:32 +05:30
..