Bug #27564

webpack compile for plugins also generates files for vendor package

Added by Anonymous almost 4 years ago. Updated over 3 years ago.

JavaScript stack
Target version:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:


When building a DEB package of foreman_ansible:

node --max_old_space_size=2048 /usr/share/foreman/node_modules/webpack/bin/webpack.js --config /usr/share/foreman/config/webpack.config.js --bail --env.pluginName=foreman_ansible
             foreman_ansible/intl/locale/    34.9 kB      31  [emitted]         intl/locale/ca
            foreman_ansible/     1.1 MB      32  [emitted]         foreman_ansible
           foreman_ansible/  133 bytes      32  [emitted]         foreman_ansible
                     foreman_ansible/     887 kB      33  [emitted]         bundle
                    foreman_ansible/  124 bytes      33  [emitted]         bundle
                     foreman_ansible/     460 kB      34  [emitted]         vendor     103 kB          [emitted]         
       foreman-vendor.bundle-v0.1.1-production-708c93425c541812ff58.css    89.1 kB          [emitted]         
        foreman-vendor.bundle-v0.1.1-production-708c93425c541812ff58.js    5.32 MB          [emitted]  [big]      16 MB          [emitted]         
           foreman_ansible/react-intl/locale/sv-f8d5a88a254db9374bb1.js    2.86 kB       1  [emitted]         react-intl/locale/sv
        foreman_ansible/react-intl/locale/zh-85c7671c903a0f57f298.js.gz  880 bytes          [emitted]         
        foreman_ansible/react-intl/locale/sv-f8d5a88a254db9374bb1.js.gz  790 bytes          [emitted]         
          foreman_ansible/intl/locale/    5.36 kB          [emitted]         
          foreman_ansible/intl/locale/    5.46 kB          [emitted]         
                                       foreman_ansible/manifest.json.gz    1.08 kB          [emitted]         
                      foreman_ansible/vendor-3136655871aada2a0b93.js.gz    29.1 kB          [emitted]    19.2 kB          [emitted]         
    foreman-vendor.bundle-v0.1.1-production-708c93425c541812ff58.css.gz    17.7 kB          [emitted]         
             foreman_ansible/foreman_ansible-037bd611d93047fc37f4.js.gz     100 kB          [emitted]         
                      foreman_ansible/bundle-5e2d83a5638034012011.js.gz    86.5 kB          [emitted]         
                  foreman_ansible/     107 kB          [emitted]         
                  foreman_ansible/     225 kB          [emitted]         
         foreman_ansible/     265 kB          [emitted]  [big]  
     foreman-vendor.bundle-v0.1.1-production-708c93425c541812ff58.js.gz    1.53 MB          [emitted]  [big]    3.78 MB          [emitted]  [big]

Because we're putting the whole webpack folder into the resulting DEB package, this is now broken on install:

Preparing to unpack .../8-ruby-foreman-ansible_3.0.6-1_all.deb ...
Unpacking ruby-foreman-ansible (3.0.6-1) over (3.0.3-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-zSUTeZ/8-ruby-foreman-ansible_3.0.6-1_all.deb (--unpack):
 trying to overwrite '/var/lib/foreman/public/webpack/foreman-vendor.bundle-v0.1.1-production-708c93425c541812ff58.css', which is also in package foreman 9999-bionic+scratchbuild+20190807120255
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

It would be super nice, if these could get excluded in the webpack config on plugin compiles.

Associated revisions

Revision 05c71143 (diff)
Added by Michael Moll almost 4 years ago

Fixes #27564 - Copy only plugin webpack assets


#1 Updated by The Foreman Bot almost 4 years ago

  • Assignee set to Anonymous
  • Status changed from New to Ready For Testing
  • Pull request added

#2 Updated by Anonymous almost 4 years ago

  • Status changed from Ready For Testing to Closed

#3 Updated by Tomer Brisker over 3 years ago

  • Fixed in Releases 1.23.0 added

Also available in: Atom PDF