Currently, the method to collect the plugins which should be processed by webpack is implemented like this:
Rule 1: the plugin starts with foreman or katello
Rule 2: it does not end with “_core” or “-core”
Plugins not named like this can not use deliver react complements e.g.
Every foreman plugin normally should know, that its a foreman plugin In the ruby gem specification there is a metadata attribute which can be used to specify, that its a foreman plugin.
Keep in mind: Metadata items have the following restrictions:
- The metadata must be a Hash object
- All keys and values must be Strings
- Keys can be a maximum of 128 bytes and values can be a maximum of 1024 bytes
- All strings must be UTF-8, no binary data is allowed
I’m currently working on a PR to use the new metadata flag “is_foreman_plugin”:
The suggestion would be, to remove the old implementation completely and only use the “is_foreman_plugin” flag.
CC @ekohl @Ron_Lavi
+1 for using only
is_foreman_plugin in the plugin gem metadata.
The plugin template should be updated as well:
Then we should encourage plugin authors to update. Luckily not a huge number of plugins use webpack so it should be fairly easy.
Sure, I will do this after we have clarified and agreed that this approach is the prefered one.
Given there is no objection and it’s a simple addition without removal, I’d say we can start with implementing this.
A quick grep through foreman-packaging’s rpm/develop branch I think these are Foreman plugins that use webpack. It may not be complete or correct, but it may help you:
There is additional one which is not packaged yet, but is using webpack: