Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-34683

Illogical shared module warnings when building Kubevirt dynamic plugin

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • None
    • 4.16.0
    • Management Console
    • None
    • No
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • In Progress

      Description of problem:

      When building https://github.com/kubevirt-ui/kubevirt-plugin from its release-4.16 branch, following warnings are issued during the webpack build:

      WARNING in shared module react
      
      No required version specified and unable to automatically determine one. Unable to find required version for "react" in description file (/home/vszocs/work/kubevirt-plugin/node_modules/react/package.json). It need to be in dependencies, devDependencies or peerDependencies.
      

      These warnings should not appear during the plugin build.

      Root cause seems to be webpack module federation code which attempts to auto-detect actual build version of shared modules, but this code seems to be unreliable and warnings such as the one above are anything but helpful.

      How reproducible: always on kubevirt-plugin branch release-4.16

      Steps to Reproduce:

      1. git clone https://github.com/kubevirt-ui/kubevirt-plugin
      2. cd kubevirt-plugin
      3. yarn && yarn dev
      

            [OCPBUGS-34683] Illogical shared module warnings when building Kubevirt dynamic plugin

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Moderate: OpenShift Container Platform 4.17.0 bug fix and security update), and where to find the updated files, follow the link below.

            If the solution does not work for you, open a new bug report.
            https://access.redhat.com/errata/RHSA-2024:3718

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Moderate: OpenShift Container Platform 4.17.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2024:3718

            YaDan Pei added a comment -

            1. fetch latest console code and build latest dynamic-plugin-sdk packages

            $ git log -1
            commit c0418183e614d7e3e7ea43922b20ae6419d9921f (HEAD -> hack, upstream/release-4.18, upstream/release-4.17, upstream/master, upstream/HEAD)
            Merge: 6099a7dbd3 e8bc13d1ee
            Author: openshift-merge-bot[bot] <148852131+openshift-merge-bot[bot]@users.noreply.github.com>
            Date:   Tue Jun 11 06:23:45 2024 +0000    Merge pull request #13919 from logonoff/OCPBUGS-34752
                
                OCPBUGS-34752: Forward selected key prop in IconDropdown component
             
            $ git log | grep '#13893'
                Merge pull request #13893 from vojtechszocs/ensure-shared-module-req-version
            $ cd frontend/packages/console-dynamic-plugin-sdk/dist
            
            $ ls -ltr
            total 0
            drwxr-xr-x  8 yapei  staff  256 Jun 11 15:17 core
            drwxr-xr-x  6 yapei  staff  192 Jun 11 15:17 internal
            drwxr-xr-x  7 yapei  staff  224 Jun 11 15:17 webpack

            2.  fetch kubevirt-plugin code and do following updates(points to local console dynamic plugin sdk packages so that the new changes/fixes can take effect)

            $ git diff package.json 
            diff --git a/package.json b/package.json
            index cd03f69b..c7756f1e 100644
            --- a/package.json
            +++ b/package.json
            @@ -51,9 +51,9 @@
               "devDependencies": {
                 "@cypress/webpack-preprocessor": "^5.11.0",
                 "@kubevirt-ui/kubevirt-api": "^1.2.2",
            -    "@openshift-console/dynamic-plugin-sdk": "1.1.0",
            -    "@openshift-console/dynamic-plugin-sdk-internal": "1.0.0",
            -    "@openshift-console/dynamic-plugin-sdk-webpack": "1.0.1",
            +    "@openshift-console/dynamic-plugin-sdk": "file:/Users/yapei/go/src/github.com/openshift/console/frontend/packages/console-dynamic-plugin-sdk/dist/core",
            +    "@openshift-console/dynamic-plugin-sdk-internal": "file:/Users/yapei/go/src/github.com/openshift/console/frontend/packages/console-dynamic-plugin-sdk/dist/internal",
            +    "@openshift-console/dynamic-plugin-sdk-webpack": "file:/Users/yapei/go/src/github.com/openshift/console/frontend/packages/console-dynamic-plugin-sdk/dist/webpack",
                 "@openshift-console/plugin-shared": "^0.0.1",
                 "@testing-library/jest-dom": "^5.16.1",
                 "@testing-library/react": "^12.1.2", 

            3. Run `yarn && yarn dev` in kubevirt-plugin folder

            following warning message disappeared

            WARNING in shared module react
            No required version specified and unable to automatically determine one. Unable to find required version for "react" in description file (/Users/yapei/repos/kubevirt-plugin/node_modules/react/package.json). It need to be in dependencies, devDependencies or peerDependencies.

            WARNING in shared module react
            No required version specified and unable to automatically determine one. Unable to find required version for "react" in description file (/Users/yapei/repos/kubevirt-plugin/node_modules/react/package.json). It need to be in dependencies, devDependencies or peerDependencies.

             

            The reported issue is fixed in master branch of openshift/console so I would like to move to VERIFIED

             

            YaDan Pei added a comment - 1. fetch latest console code and build latest dynamic-plugin-sdk packages $ git log -1 commit c0418183e614d7e3e7ea43922b20ae6419d9921f (HEAD -> hack, upstream/release-4.18, upstream/release-4.17, upstream/master, upstream/HEAD) Merge: 6099a7dbd3 e8bc13d1ee Author: openshift-merge-bot[bot] <148852131+openshift-merge-bot[bot]@users.noreply.github.com> Date:   Tue Jun 11 06:23:45 2024 +0000    Merge pull request #13919 from logonoff/OCPBUGS-34752          OCPBUGS-34752: Forward selected key prop in IconDropdown component $ git log | grep '#13893'     Merge pull request #13893 from vojtechszocs/ensure-shared-module-req-version $ cd frontend/packages/console-dynamic-plugin-sdk/dist $ ls -ltr total 0 drwxr-xr-x  8 yapei  staff  256 Jun 11 15:17 core drwxr-xr-x  6 yapei  staff  192 Jun 11 15:17 internal drwxr-xr-x  7 yapei  staff  224 Jun 11 15:17 webpack 2.  fetch kubevirt-plugin code and do following updates(points to local console dynamic plugin sdk packages so that the new changes/fixes can take effect) $ git diff package .json  diff --git a/ package .json b/ package .json index cd03f69b..c7756f1e 100644 --- a/ package .json +++ b/ package .json @@ -51,9 +51,9 @@     "devDependencies" : {       "@cypress/webpack-preprocessor" : "^5.11.0" ,       "@kubevirt-ui/kubevirt-api" : "^1.2.2" , -     "@openshift-console/dynamic-plugin-sdk" : "1.1.0" , -     "@openshift-console/dynamic-plugin-sdk-internal" : "1.0.0" , -     "@openshift-console/dynamic-plugin-sdk-webpack" : "1.0.1" , +     "@openshift-console/dynamic-plugin-sdk" : "file:/Users/yapei/go/src/github.com/openshift/console/frontend/packages/console-dynamic-plugin-sdk/dist/core" , +     "@openshift-console/dynamic-plugin-sdk-internal" : "file:/Users/yapei/go/src/github.com/openshift/console/frontend/packages/console-dynamic-plugin-sdk/dist/internal" , +     "@openshift-console/dynamic-plugin-sdk-webpack" : "file:/Users/yapei/go/src/github.com/openshift/console/frontend/packages/console-dynamic-plugin-sdk/dist/webpack" ,       "@openshift-console/plugin-shared" : "^0.0.1" ,       "@testing-library/jest-dom" : "^5.16.1" ,       "@testing-library/react" : "^12.1.2" , 3. Run `yarn && yarn dev` in kubevirt-plugin folder following warning message disappeared WARNING in shared module react No required version specified and unable to automatically determine one. Unable to find required version for "react" in description file (/Users/yapei/repos/kubevirt-plugin/node_modules/react/package.json). It need to be in dependencies, devDependencies or peerDependencies. WARNING in shared module react No required version specified and unable to automatically determine one. Unable to find required version for "react" in description file (/Users/yapei/repos/kubevirt-plugin/node_modules/react/package.json). It need to be in dependencies, devDependencies or peerDependencies.   The reported issue is fixed in master branch of openshift/console so I would like to move to VERIFIED  

            Hi vszocs@redhat.com,

            Bugs should not be moved to Verified without first providing a Release Note Type("Bug Fix" or "No Doc Update") and for type "Bug Fix" the Release Note Text must also be provided. Please populate the necessary fields before moving the Bug to Verified.

            OpenShift Jira Bot added a comment - Hi vszocs@redhat.com , Bugs should not be moved to Verified without first providing a Release Note Type("Bug Fix" or "No Doc Update") and for type "Bug Fix" the Release Note Text must also be provided. Please populate the necessary fields before moving the Bug to Verified.

              vszocs@redhat.com Vojtech Szocs
              vszocs@redhat.com Vojtech Szocs
              YaDan Pei YaDan Pei
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: