Skip to content

Conversation

vojtechszocs
Copy link
Contributor

@vojtechszocs vojtechszocs commented Sep 10, 2025

Bug fix for 4.18 Console plugin SDK related to recent addition of @patternfly/react-topology shared module in #15371.

This affects the package @openshift-console/dynamic-plugin-sdk-webpack containing code for processing shared module configuration.

The original assumption was

If 4.18 compatible Console plugins use PatternFly 5+ (as indicated by their @patternfly/react-core major version), exclude any Console provided PatternFly shared module configs.

The updated assumption is now

If 4.18 compatible Console plugins use PatternFly 5+ (as indicated by their @patternfly/react-core major version), exclude any Console provided PatternFly shared module configs except for modules where we explicitly disallow plugins to provide their own fallback version of that module (i.e. any singleton Console provided shared modules).

@openshift-ci openshift-ci bot requested review from jhadvig and spadgett September 10, 2025 17:16
@openshift-ci openshift-ci bot added component/sdk Related to console-plugin-sdk approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 10, 2025
Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2025
Copy link
Contributor

openshift-ci bot commented Sep 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: spadgett, vojtechszocs

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

@vojtechszocs
Copy link
Contributor Author

/retest

@vojtechszocs vojtechszocs changed the title Fix bug with Console provided PatternFly shared modules OCPBUGS-61569: Fix bug with Console provided PatternFly shared modules Sep 11, 2025
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 11, 2025
@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: This pull request references Jira Issue OCPBUGS-61569, which is invalid:

  • expected the bug to target the "4.18.z" version, but no target version was set
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-61569 to depend on a bug targeting a version in 4.19.0, 4.19.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Bug fix for 4.18 Console plugin SDK related to recent addition of @patternfly/react-topology shared module in #15371.

This affects the package @openshift-console/dynamic-plugin-sdk-webpack containing code for processing shared module configuration.

The original assumption was

If 4.18 compatible Console plugins use PatternFly 5+ (as indicated by their @patternfly/react-core major version), exclude any Console provided PatternFly shared module configs (*).

The updated assumption is now

If 4.18 compatible Console plugins use PatternFly 5+ (as indicated by their @patternfly/react-core major version), exclude any Console provided PatternFly shared module configs (*) except for modules where we explicitly disallow plugins to provide their own fallback version of that module (i.e. any singleton Console provided shared modules).

(*) Console provided PatternFly shared modules are limited to 4.x implementation of specific 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.

@vojtechszocs
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: This pull request references Jira Issue OCPBUGS-61569, which is invalid:

  • expected the bug to target the "4.18.z" version, but no target version was set
  • expected Jira Issue OCPBUGS-61569 to depend on a bug targeting a version in 4.19.0, 4.19.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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.

@vojtechszocs
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: This pull request references Jira Issue OCPBUGS-61569, which is invalid:

  • expected Jira Issue OCPBUGS-61569 to depend on a bug targeting a version in 4.19.0, 4.19.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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.

@jhadvig
Copy link
Member

jhadvig commented Sep 11, 2025

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 11, 2025
@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-61569, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.z) matches configured target version for branch (4.18.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-61572 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-61572 targets the "4.19.z" version, which is one of the valid target versions: 4.19.0, 4.19.z
  • bug has dependents

Requesting review from QA contact:
/cc @yapei

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 openshift-ci bot requested a review from yapei September 11, 2025 15:59
@jhadvig
Copy link
Member

jhadvig commented Sep 11, 2025

/retest

@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: This pull request references Jira Issue OCPBUGS-61569, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.z) matches configured target version for branch (4.18.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-61572 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-61572 targets the "4.19.z" version, which is one of the valid target versions: 4.19.0, 4.19.z
  • bug has dependents

Requesting review from QA contact:
/cc @yapei

In response to this:

Bug fix for 4.18 Console plugin SDK related to recent addition of @patternfly/react-topology shared module in #15371.

This affects the package @openshift-console/dynamic-plugin-sdk-webpack containing code for processing shared module configuration.

The original assumption was

If 4.18 compatible Console plugins use PatternFly 5+ (as indicated by their @patternfly/react-core major version), exclude any Console provided PatternFly shared module configs (*).

The updated assumption is now

If 4.18 compatible Console plugins use PatternFly 5+ (as indicated by their @patternfly/react-core major version), exclude any Console provided PatternFly shared module configs (*) except for modules where we explicitly disallow plugins to provide their own fallback version of that module (i.e. any singleton Console provided shared modules).

(*) Console provided PatternFly shared modules are limited to 4.x impl. of specific packages with the exception of @patternfly/react-topology which uses 5.x impl.

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.

@vojtechszocs
Copy link
Contributor Author

/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Sep 15, 2025
@yapei
Copy link
Contributor

yapei commented Sep 18, 2025

verified the changes with following steps

  • Terminal 1, clone console with this PR changes, build console frontend
$ git clone git@github.com:vojtechszocs/console.git vojtechszocs-console -b pf-shared-module-fix
$ cd vojtechszocs-console
$ ./clean.sh
$ cd frontend
$ yarn install
$ yarn dev-once
  • Terminal 2, build backend
$ cd vojtechszocs-console
$ git log -1
commit d3988c5f8db3d30cb6f9646012378a15b580d217 (HEAD -> pf-shared-module-fix, origin/pf-shared-module-fix)
Author: Vojtech Szocs <vszocs@redhat.com>
Date:   Wed Sep 10 17:14:30 2025 +0000

    Fix bug with Console provided PatternFly shared modules
$ ./build-backend.sh
$ oc login  xxxxxx
$ source ./contrib/oc-environment.sh
$ ./bin/bridge   -plugins kubevirt-plugin=http://localhost:9001/   -i18n-namespaces=plugin__kubevirt-plugin   -branding openshift
$ git clone git@github.com:pcbailey/kubevirt-plugin.git pcbailey-kubevirt-plugin -b topology-extensions--4.18
$ cd pcbailey-kubevirt-plugin
$ make changes to package.json file
$ git diff package.json
diff --git a/package.json b/package.json
index b4e90d713..a1d68b356 100644
--- a/package.json
+++ b/package.json
@@ -52,9 +52,9 @@
   "devDependencies": {
     "@cypress/webpack-preprocessor": "^6.0.2",
     "@kubevirt-ui/kubevirt-api": "^1.3.6",
-    "@openshift-console/dynamic-plugin-sdk": "4.18.0",
-    "@openshift-console/dynamic-plugin-sdk-internal": "4.18.0",
-    "@openshift-console/dynamic-plugin-sdk-webpack": "4.18.0",
+    "@openshift-console/dynamic-plugin-sdk": "file:/Users/yapei/go/src/github.com/openshift/vojtechszocs-console/frontend/packages/console-dynamic-plugin-sdk/dist/core",
+    "@openshift-console/dynamic-plugin-sdk-internal": "file:/Users/yapei/go/src/github.com/openshift/vojtechszocs-console/frontend/packages/console-dynamic-plugin-sdk/dist/internal",
+    "@openshift-console/dynamic-plugin-sdk-webpack": "file:/Users/yapei/go/src/github.com/openshift/vojtechszocs-console/frontend/packages/console-dynamic-plugin-sdk/dist/webpack",
     "@openshift-console/plugin-shared": "^0.0.3",
     "@testing-library/jest-dom": "^5.16.1",
     "@testing-library/react": "^12.1.2",
$ yapei-mac:pcbailey-kubevirt-plugin yapei$ yarn
yarn install v1.22.22
[1/4] 🔍  Resolving packages...
success Already up-to-date.
$ cp node_modules/@openshift-console/dynamic-plugin-sdk/docs/console-extensions.md .
$ husky install
husky - Git hooks installed
✨  Done in 1.18s.
yapei-mac:pcbailey-kubevirt-plugin yapei$ yarn dev
yarn run v1.22.22
$ yarn clean && NODE_ENV=development NODE_OPTIONS=--max-old-space-size=8192 yarn ts-node node_modules/.bin/webpack serve --progress
$ rm -rf dist
$ ts-node -O '{"module":"commonjs"}' node_modules/.bin/webpack serve --progress
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:9001/, http://[::1]:9001/
<i> [webpack-dev-server] On Your Network (IPv4): http://10.72.112.202:9001/

Visit topology page /k8s/cluster/projects/<project>/workloads?view=graph, runtime error no longer shows up

Screen.Recording.2025-09-18.at.2.52.24.PM.mov

@jhadvig
Copy link
Member

jhadvig commented Sep 18, 2025

@yapei could somebody from your team verify this issue 🙏

@yapei
Copy link
Contributor

yapei commented Sep 19, 2025

/verified by @yapei

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Sep 19, 2025
@openshift-ci-robot
Copy link
Contributor

@yapei: This PR has been marked as verified by @yapei.

In response to this:

/verified by @yapei

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

/retest-required

Remaining retests: 0 against base HEAD cb37983 and 2 for PR HEAD d3988c5 in total

Copy link
Contributor

openshift-ci bot commented Sep 19, 2025

@vojtechszocs: all tests passed!

Full PR test history. Your PR dashboard.

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 350061f into openshift:release-4.18 Sep 19, 2025
8 checks passed
@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: Jira Issue Verification Checks: Jira Issue OCPBUGS-61569
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-61569 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

In response to this:

Bug fix for 4.18 Console plugin SDK related to recent addition of @patternfly/react-topology shared module in #15371.

This affects the package @openshift-console/dynamic-plugin-sdk-webpack containing code for processing shared module configuration.

The original assumption was

If 4.18 compatible Console plugins use PatternFly 5+ (as indicated by their @patternfly/react-core major version), exclude any Console provided PatternFly shared module configs.

The updated assumption is now

If 4.18 compatible Console plugins use PatternFly 5+ (as indicated by their @patternfly/react-core major version), exclude any Console provided PatternFly shared module configs except for modules where we explicitly disallow plugins to provide their own fallback version of that module (i.e. any singleton Console provided shared modules).

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-merge-robot
Copy link
Contributor

Fix included in accepted release 4.18.0-0.nightly-2025-09-19-205454

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. component/sdk Related to console-plugin-sdk jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants