feat(skills): add rhdh-bump-yarn for multi-repo Yarn Berry bumps - #82
feat(skills): add rhdh-bump-yarn for multi-repo Yarn Berry bumps#82nickboldt wants to merge 11 commits into
Conversation
Adds a skill+script to align Yarn binaries, packageManager/yarnPath pins, Containerfile refs, and yarn.lock refresh across the five RHDH trees used for RHIDP-16074-style upgrades. https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pretty sure that most of this can be handled by running two commands:
yarn set version stable
yarn installBasically, this just needs to run everywhere there is a package.json with a packageManager field with Yarn configured. Any agent should be clever enough to find those using some CLI-foo. No need to carry a bunch of custom JS code for it.
There was a problem hiding this comment.
Good call — for normal workspaces yarn set version <exact> + lock refresh is the right API; we shouldn’t reimplement Berry binary download / packageManager+yarnPath rewrites.
Slimmed the skill/script accordingly: matching packageManager dirs now run yarn set version <to> (exact version so we stay aligned with the Renovate/reference bump, not stable). What’s left in the JS is only what Yarn can’t see across this five-repo set:
- selective
--from(leave roadie/backstage/dcm / Yarn 3 alone) - Containerfile /
ENV YARN=/ embeddedyarn set versiontext - orphan
.yarn/releases(distgit) withoutpackageManager - Fullsend helper hardcodes (rhdh-plugins)
- inherited
yarn.lockrefresh (YN0028 after root-only bumps)
Happy to trim further if you think any of those extras belong in the skill doc only (agent CLI-foo) rather than the script.
Decisions / wording here: Auto (Cursor agent router), powered by Composer.
Discover yarn.lock under workspaces that inherit a root yarn pin (not only dirs whose package.json was rewritten), refresh with `yarn install --mode=update-lockfile`, skip explicit older pins and dist-dynamic, and write yarn-*.cjs as executable (0755). Prevents YN0028 immutable CI failures after root-only Yarn bumps. https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Scan and safety-bump .fullsend/<profile>/bin/yarn hardcodes, document yarnPath derivation as the durable pattern, and note Fullsend is per-repo for rhdh-plugins only (not redhat-developer/rhdh). https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Drive packageManager/yarnPath/releases via Yarn itself; keep the script as an orchestrator for selective --from, Containerfile/Fullsend extras, orphan distgit binaries, and inherited lock refresh. https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer yarn set version for workspaces; drop curl/orphan binary download (GH first, copy into GL/distgit). Address Sonar complexity/nesting smells by splitting helpers. Docs: exact --to, no stable. https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
…at.com Make rhidp/rhdh and rhidp/rhdh-plugin-catalog explicit CEE GitLab hosts so agents use glab against gitlab.cee.redhat.com (not gitlab.com). https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Match the GitLab CEE rows so every repo cell is a clickable URL. https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the Yarn 3.8.6 --from special case; rhdh-cli joins the normal GH bump list. https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
https://redhat.atlassian.net/browse/RHIDP-16074 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
rhdh-bump-yarnskill +scripts/bump-yarn.jsto bump Yarn Berry (binaries, yarnPath/packageManager/Containerfile pins) across rhdh-plugins, rhdh, overlays, rhdh downstream, and rhdh-plugin-catalogyarn.lockviayarn install --mode=skip-build(opt out with--no-refresh-locks)Test plan
node skills/rhdh-bump-yarn/scripts/bump-yarn.js --help--scan --root <repo>on at least one checkout--dry-run --to 4.17.1 --root <repo>shows expected binaries/files--no-refresh-locksGenerated-by: cursor
Ref: https://redhat.atlassian.net/browse/RHIDP-16074