Skip to content

migrate node-remediation-console-plugin to npm#79375

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
batzionb:nhcNpm
May 18, 2026
Merged

migrate node-remediation-console-plugin to npm#79375
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
batzionb:nhcNpm

Conversation

@batzionb
Copy link
Copy Markdown
Contributor

@batzionb batzionb commented May 17, 2026

Follow up on medik8s/node-remediation-console#100
Migrating node-remediation-console-plugin from yarn 1 to npm

Summary

This PR updates the OpenShift CI configuration for the node-remediation-console component to support npm instead of Yarn v1, as a follow-up to upstream changes in the medik8s/node-remediation-console repository.

Changes

The CI lint test step for the main branch of node-remediation-console is updated to use npm:

  • Before: yarn install --ignore-scripts && yarn run lint
  • After: npm ci && npm run lint

This change is made in ci-operator/config/medik8s/node-remediation-console/medik8s-node-remediation-console-main.yaml, which defines how the OpenShift CI system builds and tests the component.

Note that the release branches (0.6, 0.8, 0.9, 0.10, 0.11) retain their Yarn-based configuration, as only the main development branch is being migrated to npm at this time.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Walkthrough

The CI configuration for the node-remediation-console project is updated to replace yarn with npm for the lint test step. The commands field now uses npm ci && npm run lint instead of yarn install --ignore-scripts && yarn run lint.

Changes

Package Manager Update for Node Remediation Console CI

Layer / File(s) Summary
CI lint command configuration
ci-operator/config/medik8s/node-remediation-console/medik8s-node-remediation-console-main.yaml
The lint test step commands is updated from yarn install --ignore-scripts && yarn run lint to npm ci && npm run lint.

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'migrate node-remediation-console-plugin to npm' accurately summarizes the main change: updating the CI configuration from Yarn to npm for the node-remediation-console package.
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 Custom check is not applicable. The check validates Ginkgo test name stability in test files, but this PR only modifies CI config YAML files, not Go test definitions.
Test Structure And Quality ✅ Passed Check for "Test Structure and Quality" is not applicable. PR modifies only CI configuration (YAML), not test code. No Ginkgo tests exist in this openshift/release repository to evaluate.
Microshift Test Compatibility ✅ Passed This PR does not add Ginkgo e2e tests. It only modifies a CI configuration YAML file to migrate from Yarn to npm for a lint job. The MicroShift Test Compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR does not add any Ginkgo e2e tests. It only modifies a CI configuration YAML file to migrate node-remediation-console-plugin from Yarn to npm. The custom check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only CI operator config, not deployment manifests, operator code, or controllers. No scheduling constraints introduced. Check not applicable.
Ote Binary Stdout Contract ✅ Passed Check not applicable. OTE Binary Stdout Contract targets Go code violations. This PR only modifies YAML CI configuration with no Go code changes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Check is not applicable. This PR only modifies CI configuration YAML (package manager migration). No Ginkgo e2e tests are added.

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

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

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 and usage tips.

@openshift-ci openshift-ci Bot requested review from clobrano and razo7 May 17, 2026 13:57
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 17, 2026
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.

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
`@ci-operator/config/medik8s/node-remediation-console/medik8s-node-remediation-console-main.yaml`:
- Line 23: The change replaces a Yarn install that previously suppressed
lifecycle scripts with plain `npm ci`, which runs scripts by default; update the
`commands` entry so the install step preserves the prior --ignore-scripts
behavior (i.e., run npm ci with --ignore-scripts) before running the lint step,
keeping the sequence in the `commands` key (refer to the existing commands
line).
🪄 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: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 09b410c5-8596-446f-8b2b-ad8da9ab1a7e

📥 Commits

Reviewing files that changed from the base of the PR and between 16e4c03 and 5a8a2e3.

📒 Files selected for processing (1)
  • ci-operator/config/medik8s/node-remediation-console/medik8s-node-remediation-console-main.yaml

tests:
- as: lint
commands: yarn install --ignore-scripts && yarn run lint
commands: npm ci && npm run lint
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Does npm cirun lifecycle scripts by default, and is--ignore-scriptsthe npm equivalent of Yarn v1install --ignore-scripts?

💡 Result:

Yes, npm ci runs lifecycle scripts by default [1]. These include scripts such as preinstall, install, and postinstall, which are executed after the dependencies are installed into node_modules [1]. Yes, --ignore-scripts is the npm equivalent of Yarn v1's install --ignore-scripts [2][3]. When the --ignore-scripts flag is passed to npm ci, it prevents the execution of these lifecycle scripts [2][4]. This is a common security practice in automated environments to avoid running untrusted code during the installation process [3][5]. Note that while --ignore-scripts prevents automatic execution of lifecycle scripts, it does not prevent the execution of scripts explicitly called via commands like npm run-script [6][4].

Citations:


Preserve previous --ignore-scripts install behavior for lint CI.

Line 23 changes semantics: npm ci runs lifecycle scripts by default, while the prior Yarn command explicitly suppressed them. This introduces unnecessary supply-chain/script-execution risk in a lint-only job.

Suggested change
-  commands: npm ci && npm run lint
+  commands: npm ci --ignore-scripts && npm run lint
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
commands: npm ci && npm run lint
commands: npm ci --ignore-scripts && npm run lint
🤖 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
`@ci-operator/config/medik8s/node-remediation-console/medik8s-node-remediation-console-main.yaml`
at line 23, The change replaces a Yarn install that previously suppressed
lifecycle scripts with plain `npm ci`, which runs scripts by default; update the
`commands` entry so the install step preserves the prior --ignore-scripts
behavior (i.e., run npm ci with --ignore-scripts) before running the lint step,
keeping the sequence in the `commands` key (refer to the existing commands
line).

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@batzionb: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-medik8s-node-remediation-console-main-lint medik8s/node-remediation-console presubmit Ci-operator config changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@razo7
Copy link
Copy Markdown
Member

razo7 commented May 17, 2026

/pj-rehearse

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@razo7: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@razo7
Copy link
Copy Markdown
Member

razo7 commented May 18, 2026

This change depends on medik8s/node-remediation-console#100, so we must merge this PR to test medik8s/node-remediation-console#100 on PR...

@razo7
Copy link
Copy Markdown
Member

razo7 commented May 18, 2026

/lgtm
/pj-rehearse ack

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@razo7: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label May 18, 2026
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 18, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: batzionb, razo7

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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

@batzionb: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/medik8s/node-remediation-console/main/lint 5a8a2e3 link unknown /pj-rehearse pull-ci-medik8s-node-remediation-console-main-lint

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.

@razo7
Copy link
Copy Markdown
Member

razo7 commented May 18, 2026

/pj-rehearse skip

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@razo7: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot merged commit 6d4c827 into openshift:main May 18, 2026
14 of 15 checks passed
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. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants