RFC: Changing how we handle Webpack Building

Thanks to everyone who contributed to the vendor effort!

atm we will not accept PRs changing the package.json until 1.23 is branched?

Later today I will update about the next goals of the vendor project.

  • It will Include creating a tutorial and a deep-dive about working with 3rd-party packages (add/update/delete/consume).

After the merges for core and packaging yesterday, it’s time to look at plugins (foreman-tasks, foreman_ansible, foreman_remote_execution, katello):

  • foreman_remote_execution got a regular update yesterday (1.8.0 to 1.8.2) which got built with the new Foreman bundle already and is working fine on my nightly VM
  • foreman-tasks also got a regular update, which scratch built fine before the big change, but then failed to release build with the change, see below for detail
  • foreman_ansible started building public/webpack/foreman-vendor.<version>.<hash>.js and .css files, which need to be excluded. I’ve opened foreman-packaging#3930 for that, but we might want to make this a macro or something. @ekohl, what do you think?
  • katello I didn’t touch at all yet

Now to the (slightly longer) foreman-tasks story :slight_smile:

I’ve used foreman-tasks 0.15.5 yesterday for my initial “we just need to rebuild the plugin to make it work again” tests and it worked just fine. However, in parallel to this, there also was a foreman-tasks 0.16.0 release that built fine during scratch building (as that happened before we merged @sharvit’s work), but failed during the actual release build.

Avi and I think that commit 0eacaf8587bf88986a675f4b5acecb93cc9b58f6 is what broke tasks, as it introduced a dependency on bootstrap-sass without adding it to package.json or the RPM spec file. This was fine before, as Foreman itself required bootstrap-sass and thus it was also available to the plugins. With the change to @theforeman/vendor, this is not the canse anymore and the foreman-tasks fails to build. As a workaround, I’ve opened foreman-packaging#3931 which explicitly adds bootstrap-sass to the BuildRequires and that builds fine again.

I think this is a good enough workaround until we migrate foreman-tasks to use @theforeman/vendor directly.

CC @aruzicka @iNecas for their f-tasks hats :slight_smile:

1 Like

Quick update on Katello, it needs the same massaging as foreman_ansible for the newly generated files, but the resulting RPM does not have a working UI :frowning:

PR: https://github.com/theforeman/foreman-packaging/pull/3932
Scratch build: http://koji.katello.org/koji/taskinfo?taskID=212894

the fix for public/webpack/foreman-vendor.<version>.<hash>.js and .css went in as foreman-packaging#3933 and foreman_ansible is currently building with it. when the build has finished we will have tasks, ansible and rex as working rpms.

just katello left :slight_smile:

2 Likes

The next goals for the vendor

plugin work

  1. ATM we are only having issues with katello and I am working on migrating katello to use the new vendor, hopefully it will fix katello or give us some clue about the issue.
  2. Update foreman-tasks
  3. Update rex
  4. Update foreman-ansible

Vendor Work

  1. Release none alpha version v0.1.0
  2. Announce the new vendor
  3. Write a tutorial about adding/updating/removing packages
  4. Do a deep dive about managing npm deps with the new vendor
  5. Update the how to create a plugin
  6. Update the plugin template to use webpack and the new vendor
1 Like

Migration PR in katello: https://github.com/Katello/katello/pull/8221

The katello issue resolved :slight_smile:

2 Likes

foreman-tasks migration: https://github.com/theforeman/foreman-tasks/pull/440

1 Like

foreman_ansible migration: https://github.com/theforeman/foreman_ansible/pull/288

I wanted to check in as this work continues to have a burden on packaging. Can we apply a deadline of 1.24 for all plugins to convert to theforeman JS package? Looking around this would include migrating:

  • foreman_ansible
  • foreman_inventory_upload

Can an update on the remaining dependencies required in the RPM build environment also be commented on? The ones I mean are: