Skip to content

Conversation

@illume
Copy link
Contributor

@illume illume commented Nov 26, 2025

This fixes the runCommand to properly take into account user and static plugins.

  • frontend: runPlugin: Fix to handle static-plugins plugins
  • app: runCmd: Add user and static plugin type to runScript

Testing

There are some unit tests for this that are run on win/linux/Mac.
The minikube plugin was failing by hanging on the Add cluster view when installed as a user plugin.

This static-plugins path for plugins was added recently, but this
function did not consider it.
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: illume

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 26, 2025
@k8s-ci-robot k8s-ci-robot requested a review from sniok November 26, 2025 19:55
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 26, 2025
@illume illume marked this pull request as draft November 26, 2025 19:59
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 26, 2025
This function was not updated to account for these two plugin
type paths.

Also the script exits with 1 when enountering a wrong path.
Otherwise the script just hangs.
@illume illume force-pushed the run-cmd-plugin-folders branch from e4e4446 to 837aa4a Compare November 26, 2025 20:07
@illume illume marked this pull request as ready for review November 26, 2025 21:19
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 26, 2025
@k8s-ci-robot k8s-ci-robot requested a review from yolossn November 26, 2025 21:19
@illume illume requested review from Copilot and joaquimrocha and removed request for ashu8912, sniok and yolossn November 26, 2025 21:20
Copilot finished reviewing on behalf of illume November 26, 2025 21:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for static-plugins plugin type in both the frontend and backend (electron app), enabling plugins bundled with the application to be properly identified and executed alongside the existing plugins and user-plugins.

Key Changes:

  • Extended path normalization and package identification to handle static-plugins directories
  • Added static-plugins directory to the list of allowed script execution paths in the electron app
  • Improved error handling in runScript to exit with code 1 instead of silently returning

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
frontend/src/plugin/runPlugin.ts Added static-plugins path normalization and package identification mappings for minikube plugins
frontend/src/plugin/runPlugin.test.ts Added comprehensive test coverage for static-plugins paths including Windows path handling
app/electron/runCmd.ts Extended runScript validation to allow scripts from user-plugins and static-plugins directories, improved error handling
app/electron/runCmd.test.ts Added test suite for runScript function covering all three allowed plugin directories

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@illume illume merged commit 0cfeae0 into kubernetes-sigs:main Dec 3, 2025
17 of 18 checks passed
@illume illume deleted the run-cmd-plugin-folders branch December 3, 2025 09:09
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. minikube size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants