Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-2090

forceDownload parameters always deletes existent package

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 1.7.1
    • Plugin
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Moderate

      Description of problem:

      The initContainer delete the already downloaded tar.gz package if the custom plugin is configured as "forceDownload: true". 

      Prerequisites (if any, like setup, operators/versions):

      You must have a custom dynamic plugins packed as tar.gz.

      Steps to Reproduce

      1. Install RHDH 1.7.1
      2. Put your custom plugins in a repository reachable from Developer Hub
      3. Configure the plugins in the app-dynamic-plugins.yaml loaded by RHDH
      4. Set the parameter "forceDownload: true"
      5. Reboot RHDH
      6. Go to "Extension" page from UI
      7. You will see your plugin listed
      8. Reboot RHDH 
      9. Go to "Extension" page 
      10. Your plugin isn't loaded 
      11. Reboot RHDH
      12. Go to "Extension" page
      13. Your plugin is listed again 

      Actual results:

      Plugins is loaded every other time.

      Expected results:

      Plugins is loaded every time. 

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

      This is the init container log the first time, when the plugin is loaded

       
       ======= Installing dynamic plugin @mbertuzzi/my-great-plugin@1.0.0
      ==> Grabbing package archive through `npm pack`
      ==> Verifying package integrity
      ==> Removing previous plugin directory /dynamic-plugins-root/premisedata-plugin-file-values-dynamic-1.0.2
      ==> Extracting package archive /dynamic-plugins-root/premisedata-plugin-file-values-dynamic-1.0.2.tgz
      ==> Removing package archive /dynamic-plugins-root/premisedata-plugin-file-values-dynamic-1.0.2.tgz
      ==> Successfully installed dynamic plugin @premisedata/plugin-file-values-dynamic@1.0.2
      ==> Merging plugin-specific configuration
       
      And this are the logs when the plugin isn't loaded
       
      ======= Installing dynamic plugin @mbertuzzi/my-great-plugin@1.0.0{}
      ==> Grabbing package archive through `npm pack`
      ==> Verifying package integrity
      ==> Extracting package archive /dynamic-plugins-root/premisedata-plugin-file-values-dynamic-1.0.2.tgz
      ==> Removing package archive /dynamic-plugins-root/premisedata-plugin-file-values-dynamic-1.0.2.tgz
      ==> Successfully installed dynamic plugin @premisedata/plugin-file-values-dynamic@1.0.2
      ==> Merging plugin-specific configuration
       

      It seems that the "Removing previous plugin directory" phase delete also the just downloaded package, because nothing will be into 

      /opt/dynamic-root 

      when RHDH starts.

       

              Unassigned Unassigned
              rh-ee-mbertuzz Manuel Bertuzzi
              RHIDP - Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: