<div dir="ltr">Sounds good to me.<div><br></div><div>I don't want to make this sound like a priority or a blocker to what you describe, but it would be nice if we could figure out a clean way to reverse roles a bit when it comes to migrate ops. In the end it's the *new* subsystem that has a responsibility to support migration, and it's the new subsystem that has the potential to break migration. The management model of the old subsystem is fixed and known. We expose the migrate ops as API of the old subsystem for solid UX reasons, but really it's the new stuff that has to ensure they work correctly.</div><div><br></div><div>Can something like the undertow (extension) maven module in WF have a test-only dep on a legacy FP, and then use that to build up a legacy config and migrate it? I've forgotten if our subsystem test stuff supports having two separate extensions involved.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Brian Stansberry<div>Manager, Senior Principal Software Engineer</div><div>Red Hat</div></div></div></div>
<br><div class="gmail_quote">On Thu, Sep 28, 2017 at 3:11 AM, Jeff Mesnil <span dir="ltr"><<a href="mailto:jmesnil@redhat.com" target="_blank">jmesnil@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
We had some discussion recently about improving the release process & development of WildFly after the release of WildFly 11.<br>
<br>
One of the proposal was to avoid building and testing code that is not changing often from WildFly every time the project is built.<br>
A good candidate for that kind of code is the legacy extensions.<br>
<br>
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.<br>
For example:<br>
* web > undertow<br>
* messaging > messaging-activemq<br>
* jacorb > iiop-openjdk<br>
Other legacy extensions are not migrated (cmp, jaxr and configadmin).<br>
(jacorb legacy extension is a bit different as it is still usable by leveraging the runtime of iiop-openjdk aiui).<br>
<br>
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.<br>
But every time we build and release WildFly, we have to compile and test that unchanged code.<br>
<br>
I started a proof of concept that provides a feature pack (wildfly-legacy-feature-pack)<br>
that contains legacy extensions so they can be removed from WildFly codebase:<br>
<br>
<a href="https://github.com/jmesnil/wildfly-legacy" rel="noreferrer" target="_blank">https://github.com/jmesnil/<wbr>wildfly-legacy</a><br>
<br>
These legacy extensions are provided by the wildfly-legacy-feature-pack that contains everything to install them in WildFly (module definitions and jars).<br>
Wildfly’s own feature-pack then depends on it[1] so that the actual distribution of WildFly is not different from the current one.<br>
But a lot of code can be removed from the wildfly codebase by moving these extensions to a separate project.<br>
<br>
Since legacy extensions have no runtime and only a management model, they have few dependencies and relies only on the wildfly-core-feature-pack.<br>
<br>
There is just an interesting problem with the migrate operation that some of these extensions define (web and messaging).<br>
The code of the :migrate operation itself is not dependent on the new extensions as it only manipulates DMR operations.<br>
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.<br>
<br>
This means that the legacy extensions depends on the new extensions (defined in wildfly) *with a test scope*[2].<br>
<br>
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*).<br>
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.<br>
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.<br>
<br>
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.<br>
<br>
Moving the other legacy extensions still reduces the size of WildFly with 230-ish files removed and almost 50K lines:<br>
<br>
$ git diff --shortstat master legacy-feature-pack<br>
233 files changed, 14 insertions(+), 49832 deletions(-)<br>
<br>
What do you think?<br>
Once we have released WildFly 11, would it be worth moving legacy extensions to a separate feature pack?<br>
<br>
[1] <a href="https://github.com/jmesnil/wildfly-legacy" rel="noreferrer" target="_blank">https://github.com/jmesnil/<wbr>wildfly-legacy</a><br>
[2] <a href="https://github.com/jmesnil/wildfly-legacy/blob/7b4c548033a3f652380567df60f8596d570c8db9/pom.xml#L305-L317" rel="noreferrer" target="_blank">https://github.com/jmesnil/<wbr>wildfly-legacy/blob/<wbr>7b4c548033a3f652380567df60f859<wbr>6d570c8db9/pom.xml#L305-L317</a><br>
<span class="HOEnZb"><font color="#888888">--<br>
Jeff Mesnil<br>
JBoss, a division of Red Hat<br>
<a href="http://jmesnil.net/" rel="noreferrer" target="_blank">http://jmesnil.net/</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/wildfly-dev</a></font></span></blockquote></div><br></div>