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

Remove .bin folder while creating OCI image using @janus-idp/cli

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 1.6.1, 1.9.0
    • Build
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Moderate

      Description of problem:

      When I create a .tgz archive using npm pack inside the dist-dynamic folder, we notice it doesn’t include the .bin folder inside node_modules (which contains symlinks to executables like uuidsemverresolveknexmime, etc.).

      However, when I build an OCI image using @janus-idp/cli, the .bin folder is included — and during plugin installation, we get warnings about symbolic links pointing outside the archive, like this:

      [install-dynamic-plugins] | ======= Installing dynamic plugin oci://images.paas.redhat.com/sbttv/tech-insights-backend-module-dynamic-wrapper-jsonfc:v0.0.1!developer-platform-tech-insights-backend-module-dynamic-wrapper-jsonfc
      [install-dynamic-plugins] |     ==> Copying image oci://images.paas.redhat.com/sbttv/tech-insights-backend-module-dynamic-wrapper-jsonfc:v0.0.1 to local filesystem
      [install-dynamic-plugins] |     ==> WARNING: skipping file containing link outside of the archive: developer-platform-tech-insights-backend-module-dynamic-wrapper-jsonfc/node_modules/.bin/jsonpath -> /home/biostar/Sites/redhat/devhub/dynamic_plugins/rhdh-devit-plugins/plugins/tech-insights-backend-module-dynamic-wrapper-jsonfc/dist-dynamic/node_modules/jsonpath-plus/bin/jsonpath-cli.js
      [install-dynamic-plugins] |     ==> WARNING: skipping file containing link outside of the archive: developer-platform-tech-insights-backend-module-dynamic-wrapper-jsonfc/node_modules/.bin/jsonpath-plus -> /home/biostar/Sites/redhat/devhub/dynamic_plugins/rhdh-devit-plugins/plugins/tech-insights-backend-module-dynamic-wrapper-jsonfc/dist-dynamic/node_modules/jsonpath-plus/bin/jsonpath-cli.js
      [install-dynamic-plugins] |     ==> Successfully installed dynamic plugin oci://images.paas.redhat.com/sbttv/tech-insights-backend-module-dynamic-wrapper-jsonfc:v0.0.1!developer-platform-tech-insights-backend-module-dynamic-wrapper-jsonfc 

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

      • Use any existing dynamic wrapper plugins to create OCI image.

      Steps to Reproduce

      • After creating OCI image, please use in RHDH local as dynamic plugins config
      • Inside podman container we can notice warnings as above while importing image. 

              Unassigned Unassigned
              sbttv Sreenivas Bttv
              RHIDP - Cope
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: