Skip to content

CONSOLE-5285: remove corepack dep for build-(frontend/demos), bump yarn#16426

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
logonoff:yarn-5.0
May 11, 2026
Merged

CONSOLE-5285: remove corepack dep for build-(frontend/demos), bump yarn#16426
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
logonoff:yarn-5.0

Conversation

@logonoff
Copy link
Copy Markdown
Member

@logonoff logonoff commented May 8, 2026

  • Bump yarn from 4.12.0 to 4.14.1
  • Exclude Red Hat maintained packages (upstream dynamic plugin SDK, PatternFly) from minimum package age
  • Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD in production Dockerfile (we don't yet use @playwright/browser-chromium or anything but I'd imagine we would want to)
  • Remove dependence on corepack for build-frontend.sh and build-demos.sh (taken from NO-JIRA: 4.22 breaking changes and assorted upstream alignment console-plugin-template#107)

Summary by CodeRabbit

  • Chores
    • Upgraded Yarn package manager from 4.12.0 to 4.14.1 across frontend and demo plugin environments.
    • Optimized build process with browser download skipping to improve build performance.
    • Expanded platform support to include x64, arm64, s390x, and ppc64 architectures on Linux and Darwin.
    • Added allowlist configuration for OpenShift and PatternFly npm packages.

@logonoff logonoff changed the title NO-JIRA: remove corepack dep for build-frontend NO-JIRA: remove corepack dep for build-(frontend/demos), bump yarn May 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

📝 Walkthrough

Walkthrough

This PR upgrades Yarn from version 4.12.0 to 4.14.1 across the project and refactors build scripts to resolve the Yarn executable path from .yarnrc.yml configuration rather than relying on the direct yarn command. The Dockerfile's frontend build stage is updated to delegate to build-frontend.sh with the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD environment variable set. Configuration changes include adding npm package allowlists for OpenShift and PatternFly packages and expanding the supportedArchitectures schema with explicit CPU and OS architectures. The package manager field is updated in both frontend/package.json and dynamic-demo-plugin/package.json.

🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is missing the required Jira issue prefix in the title and lacks several mandatory template sections including Analysis/Root cause, Solution description details, Test setup, Test cases, and Browser conformance. Add Jira issue prefix (e.g., CONSOLE-XXXX) to the PR title, expand the solution description with implementation details, and complete all required template sections including test cases and browser conformance checkboxes.
✅ Passed checks (11 passed)
Check name Status Explanation
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.
Stable And Deterministic Test Names ✅ Passed This PR does not modify any Ginkgo test files or test names. The changes are exclusively build configuration, Docker, and package manager updates. The check is not applicable.
Test Structure And Quality ✅ Passed Custom check not applicable. PR contains no Ginkgo test code—only build scripts, Docker config, and manifests. Check requires reviewing Ginkgo tests which are absent.
Microshift Test Compatibility ✅ Passed PR modifies only build config and Yarn/dependency management files. Contains no Go tests, Ginkgo definitions, or e2e test code. MicroShift compatibility check not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo e2e tests added in this PR. Check applies only when new tests are added. This PR contains only build config and dependency management changes (Yarn 4.12.0→4.14.1, build scripts, Dockerfile).
Topology-Aware Scheduling Compatibility ✅ Passed PR contains only build infrastructure and package manager updates. No deployment manifests, operator code, controllers, or scheduling constraints present. Check is not applicable.
Ote Binary Stdout Contract ✅ Passed OTE Binary Stdout Contract is not applicable to this PR. All changes are in frontend build configuration (Dockerfile, bash scripts, Node.js/Yarn config). No Go source code or test files are modified.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR updates build configuration, shell scripts, and package metadata only. No new Ginkgo e2e tests are present, so IPv6/disconnected network compatibility checks are not applicable.
Title check ✅ Passed The PR title accurately reflects the main changes: removing corepack dependency and bumping Yarn version across build scripts and configuration files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
build-demos.sh (1)

6-8: ⚡ Quick win

Consider hardening yarnPath resolution for better error diagnostics.

The current implementation correctly resolves yarnPath from .yarnrc.yml, but explicit guards and array invocation would improve debuggability if parsing ever breaks or the path becomes invalid. This is low effort and catches edge cases early.

Proposed patch
 pushd dynamic-demo-plugin
-LOCAL_YARN="node $(awk '/yarnPath:/{print $2}' .yarnrc.yml)"
-$LOCAL_YARN install --immutable
-$LOCAL_YARN run build
+YARN_PATH="$(awk -F': ' '$1 == "yarnPath" { print $2; exit }' .yarnrc.yml)"
+if [[ -z "${YARN_PATH}" || ! -f "${YARN_PATH}" ]]; then
+  echo "Failed to resolve yarnPath from dynamic-demo-plugin/.yarnrc.yml: '${YARN_PATH}'" >&2
+  exit 1
+fi
+LOCAL_YARN=(node "${YARN_PATH}")
+"${LOCAL_YARN[@]}" install --immutable
+"${LOCAL_YARN[@]}" run build
 popd
🤖 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 `@build-demos.sh` around lines 6 - 8, The script's LOCAL_YARN assignment using
awk to extract yarnPath lacks guards and uses a plain string that can break on
spaces; update the logic that sets LOCAL_YARN so it validates the parsed value
from ".yarnrc.yml", ensures it's non-empty and points to an existing file, and
exposes clear error messages before proceeding; also store the command as an
array (e.g., LOCAL_YARN=("node" "$YARN_PATH") conceptually) and invoke it as an
array to preserve arguments when calling the install and build steps referenced
in the diff (LOCAL_YARN install --immutable and LOCAL_YARN run build).
🤖 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.

Nitpick comments:
In `@build-demos.sh`:
- Around line 6-8: The script's LOCAL_YARN assignment using awk to extract
yarnPath lacks guards and uses a plain string that can break on spaces; update
the logic that sets LOCAL_YARN so it validates the parsed value from
".yarnrc.yml", ensures it's non-empty and points to an existing file, and
exposes clear error messages before proceeding; also store the command as an
array (e.g., LOCAL_YARN=("node" "$YARN_PATH") conceptually) and invoke it as an
array to preserve arguments when calling the install and build steps referenced
in the diff (LOCAL_YARN install --immutable and LOCAL_YARN run build).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: bdf5bc59-3bbb-47a2-a06e-a105a69a18d8

📥 Commits

Reviewing files that changed from the base of the PR and between 7aaf3d3 and 92bdf6a.

⛔ Files ignored due to path filters (4)
  • dynamic-demo-plugin/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • frontend/.yarn/releases/yarn-4.12.0.cjs is excluded by !**/.yarn/**
  • frontend/.yarn/releases/yarn-4.14.1.cjs is excluded by !**/.yarn/**
  • frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (6)
  • Dockerfile
  • build-demos.sh
  • build-frontend.sh
  • dynamic-demo-plugin/package.json
  • frontend/.yarnrc.yml
  • frontend/package.json
📜 Review details
🔇 Additional comments (5)
build-frontend.sh (1)

6-8: Same yarnPath guard concern as in build-demos.sh.

This block duplicates the same command-construction pattern and should receive the same hardening.

dynamic-demo-plugin/package.json (1)

76-76: packageManager bump looks consistent with the PR scope.

No issues here; this aligns with the Yarn 4.14.1 upgrade.

frontend/package.json (1)

347-347: Frontend packageManager update is aligned.

This change is in sync with the Yarn version bump.

frontend/.yarnrc.yml (1)

13-15: Yarn RC updates look coherent and intentional.

The preapproved package allowlist, architecture structure, and yarnPath update are consistent with the PR goals.

Also applies to: 18-25, 27-27

Dockerfile (1)

18-19: Docker build-stage env update looks good.

Setting Playwright/Cypress download skips before frontend build is a clean optimization for this stage.

Also applies to: 21-21

@logonoff
Copy link
Copy Markdown
Member Author

logonoff commented May 9, 2026

/label px-approved
/label docs-approved

these changes do not affect runtime
/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 9, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@logonoff: This PR has been marked as verified by CI.

Details

In response to this:

/label px-approved
/label docs-approved

these changes do not affect runtime
/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels May 9, 2026
@logonoff
Copy link
Copy Markdown
Member Author

logonoff commented May 9, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@logonoff: This pull request explicitly references no jira issue.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 9, 2026
@logonoff logonoff changed the title NO-JIRA: remove corepack dep for build-(frontend/demos), bump yarn CONSOLE-5285: remove corepack dep for build-(frontend/demos), bump yarn May 9, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented May 9, 2026

@logonoff: This pull request references CONSOLE-5285 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

  • Bump yarn from 4.12.0 to 4.14.1
  • Exclude Red Hat maintained packages (upstream dynamic plugin SDK, PatternFly) from minimum package age
  • Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD in production Dockerfile (we don't yet use @playwright/browser-chromium or anything but I'd imagine we would want to)
  • Remove dependence on corepack for build-frontend.sh and build-demos.sh (taken from NO-JIRA: 4.22 breaking changes and assorted upstream alignment console-plugin-template#107)

Summary by CodeRabbit

  • Chores
  • Upgraded Yarn package manager from 4.12.0 to 4.14.1 across frontend and demo plugin environments.
  • Optimized build process with browser download skipping to improve build performance.
  • Expanded platform support to include x64, arm64, s390x, and ppc64 architectures on Linux and Darwin.
  • Added allowlist configuration for OpenShift and PatternFly npm packages.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Also update yarn config to exclude Red Hat-maintained packages from `npmMinimalAgeGate`
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label May 9, 2026
@openshift-ci openshift-ci Bot added the kind/demo-plugin Related to dynamic-demo-plugin label May 9, 2026
@logonoff
Copy link
Copy Markdown
Member Author

logonoff commented May 9, 2026

these changes do not affect runtime
/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 9, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@logonoff: This PR has been marked as verified by CI.

Details

In response to this:

these changes do not affect runtime
/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rhamilto
Copy link
Copy Markdown
Member

/approve
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 11, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 11, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, rhamilto

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 11, 2026
@rhamilto rhamilto added the plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer label May 11, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 11, 2026

@logonoff: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit 9c3dcf8 into openshift:main May 11, 2026
8 checks passed
@logonoff logonoff deleted the yarn-5.0 branch May 11, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/demo-plugin Related to dynamic-demo-plugin lgtm Indicates that a PR is ready to be merged. plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer px-approved Signifies that Product Support has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants