Project

General

Profile

Actions

Bug #27564

closed

webpack compile for plugins also generates files for vendor package

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

Status:
Closed
Priority:
High
Assignee:
-
Category:
JavaScript stack
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

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/ca-21c2e6718846ef25789b.js.map    34.9 kB      31  [emitted]         intl/locale/ca
            foreman_ansible/foreman_ansible-037bd611d93047fc37f4.js.map     1.1 MB      32  [emitted]         foreman_ansible
           foreman_ansible/foreman_ansible-037bd611d93047fc37f4.css.map  133 bytes      32  [emitted]         foreman_ansible
                     foreman_ansible/bundle-5e2d83a5638034012011.js.map     887 kB      33  [emitted]         bundle
                    foreman_ansible/bundle-5e2d83a5638034012011.css.map  124 bytes      33  [emitted]         bundle
                     foreman_ansible/vendor-3136655871aada2a0b93.js.map     460 kB      34  [emitted]         vendor
   foreman-vendor.bundle-v0.1.1-production-708c93425c541812ff58.css.map     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]  
    foreman-vendor.bundle-v0.1.1-production-708c93425c541812ff58.js.map      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/cs-cfd90d61b75befcee527.js.map.gz    5.36 kB          [emitted]         
          foreman_ansible/intl/locale/de-b68d64ca46363cee2dac.js.map.gz    5.46 kB          [emitted]         
                                       foreman_ansible/manifest.json.gz    1.08 kB          [emitted]         
                      foreman_ansible/vendor-3136655871aada2a0b93.js.gz    29.1 kB          [emitted]         
foreman-vendor.bundle-v0.1.1-production-708c93425c541812ff58.css.map.gz    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/vendor-3136655871aada2a0b93.js.map.gz     107 kB          [emitted]         
                  foreman_ansible/bundle-5e2d83a5638034012011.js.map.gz     225 kB          [emitted]         
         foreman_ansible/foreman_ansible-037bd611d93047fc37f4.js.map.gz     265 kB          [emitted]  [big]  
     foreman-vendor.bundle-v0.1.1-production-708c93425c541812ff58.js.gz    1.53 MB          [emitted]  [big]  
 foreman-vendor.bundle-v0.1.1-production-708c93425c541812ff58.js.map.gz    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:
 /tmp/apt-dpkg-install-zSUTeZ/8-ruby-foreman-ansible_3.0.6-1_all.deb
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.

Actions #1

Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Anonymous
  • Pull request https://github.com/theforeman/foreman-packaging/pull/4025 added
Actions #2

Updated by Anonymous almost 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #3

Updated by Tomer Brisker over 4 years ago

  • Fixed in Releases 1.23.0 added
Actions

Also available in: Atom PDF