[wildfly-dev] [proposal] Move legacy extensions to a separate feature pack

Jeff Mesnil jmesnil at redhat.com
Thu Sep 28 04:11:05 EDT 2017


Hi,

We had some discussion recently about improving the release process & development of WildFly after the release of WildFly 11.

One of the proposal was to avoid building and testing code that is not changing often from WildFly every time the project is built.
A good candidate for that kind of code is the legacy extensions.

A legacy extension is a WildFly extension that is no longer usable (they have no runtime) but still provides a management model that can be in some case be migrated to newer extensions.
For example:
* web > undertow
* messaging > messaging-activemq
* jacorb > iiop-openjdk
Other legacy extensions are not migrated (cmp, jaxr and configadmin).
(jacorb legacy extension is a bit different as it is still usable by leveraging the runtime of iiop-openjdk aiui).

The legacy extensions are frozen. Their management model is frozen and they only require changes when the new corresponding extensions have some changes that required to be taken into account during migration.
But every time we build and release WildFly, we have to compile and test that unchanged code.

I started a proof of concept that provides a feature pack (wildfly-legacy-feature-pack)
that contains legacy extensions so they can be removed from WildFly codebase:

https://github.com/jmesnil/wildfly-legacy

These legacy extensions are provided by the wildfly-legacy-feature-pack that contains everything to install them in WildFly (module definitions and jars).
Wildfly’s own feature-pack then depends on it[1] so that the actual distribution of WildFly is not different from the current one.
But a lot of code can be removed from the wildfly codebase by moving these extensions to a separate project.

Since legacy extensions have no runtime and only a management model, they have few dependencies and relies only on the wildfly-core-feature-pack.

There is just an interesting problem with the migrate operation that some of these extensions define (web and messaging).
The code of the :migrate operation itself is not dependent on the new extensions as it only manipulates DMR operations.
However the functional test of the :migrate operation requires the new extension to be able to validate that the management model of the legacy extension has been properly migrated to a valid management model of the new extension.

This means that the legacy extensions depends on the new extensions (defined in wildfly) *with a test scope*[2].

This introduces a circular dependency between wildfly (that depends on the wildlfy-legacy-feature-pack) and the wildfly-legacy-feature-pack (that depends on wildfly extensions *with test scope*).
Since one of the dependency is in scope test, I worked around that by depending on the n-1 version of wildfly from wildlfy-legacy-feature-pack. It’s not ideal but in practice I’m not sure it is a big issue.
Maintainers of legacy extensions can build local snapshots of WildFly and use it as a dependency for the legacy-feature-pack when there might be some changes that impact the legacy extensions.

The only legacy extension that I could not move is the jacorb one. This one is tightly bound to the new iiop-openjdk extension. It inherits from its classes to provide its runtime emulation.

Moving the other legacy extensions still reduces the size of WildFly with 230-ish files removed and almost 50K lines:

$  git diff --shortstat  master legacy-feature-pack
 233 files changed, 14 insertions(+), 49832 deletions(-)

What do you think?
Once we have released WildFly 11, would it be worth moving legacy extensions to a separate feature pack?
 
[1] https://github.com/jmesnil/wildfly-legacy
[2] https://github.com/jmesnil/wildfly-legacy/blob/7b4c548033a3f652380567df60f8596d570c8db9/pom.xml#L305-L317
-- 
Jeff Mesnil
JBoss, a division of Red Hat
http://jmesnil.net/




More information about the wildfly-dev mailing list