[jboss-jira] [JBoss JIRA] (WFLY-2218) Subsystem transformers against 7.2.0

Kabir Khan (JIRA) jira-events at lists.jboss.org
Tue Oct 29 14:19:02 EDT 2013


    [ https://issues.jboss.org/browse/WFLY-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12825626#comment-12825626 ] 

Kabir Khan commented on WFLY-2218:
----------------------------------

We should also test against previous EAP versions to make sure that WF upstream does not stray too far from EAP making backwards compatibility for EAP hard in the future when WF becomes EAP.

Since the EAP legacy maven artifacts are only available for Red Hat employees with access to the VPM, we don't want to make it impossible for third-party contributors to contribute. Also we don't want to make build times jump for everyday subsystem builds.
To help with this there is an AbstractSubsystemTest.ignoreThisTestIfEAPRepositoryIsNotReachable() method. An example of its usage can be found in https://github.com/wildfly/wildfly/blob/master/weld/src/test/java/org/jboss/as/weld/WeldSubsystemTestCase.java.This checks if the following two conditions are true:
* -Djboss.test.transformers.eap is set when starting the build
* The EAP repository is available (i.e. you are currently connected to the VPN)

If those conditions are not true, tests calling that method end up being skipped (similar to if they had been @Ignore'd but more dynamic/environmental)
                
> Subsystem transformers against 7.2.0
> ------------------------------------
>
>                 Key: WFLY-2218
>                 URL: https://issues.jboss.org/browse/WFLY-2218
>             Project: WildFly
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: Domain Management
>    Affects Versions: 8.0.0.CR1
>            Reporter: Kabir Khan
>            Assignee: Brian Stansberry
>
> We have not tested the majority of subsystem transformers against AS 7.2.0. I have attempted to document why we need subsystem transformation here, and also how to use the framework: 
> https://docs.jboss.org/author/display/WFLY8/Domain+Mode+Subsystem+Transformers
> This document is WIP, and I will be updating it a bit more over the next few days.
> https://gist.github.com/kabir/6825607 contains the difference of a running WildFly instance against AS 7.2.0 in domain mode (for subsystems you don't really need to bother about this one)
> https://gist.github.com/kabir/6825559 contains the difference of a running WildFly instance against AS 7.2.0 in standalone mode, here you can see what has changed in the subsystems.
> When creating a new subsystem transformers test against 7.2.0, you will need the resource definition for the ModelVersion your subsystem uses in 7.2.0. If this is not found, you need to add a test to your subsystem, which you can delete once you have the .dmr file containing the resource defintion. Here is what I did to generate the file for JMX
> {code}
>     @Test
>     public void deleteMeWhenDone() throws Exception {
>         ModelTestControllerVersion controllerVersion = ModelTestControllerVersion.V7_2_0_FINAL;
>         ModelVersion modelVersion = ModelVersion.create(1, 1, 0); //Whatever version of your subsystem 7.2.0.Final has
>         KernelServicesBuilder builder = createKernelServicesBuilder(null);
>         builder.createLegacyKernelServicesBuilder(null, controllerVersion, modelVersion)
>             .addMavenResourceURL("org.jboss.as:jboss-as-jmx:" + controllerVersion.getMavenGavVersion());
>         KernelServices services = builder.build();
>         generateLegacySubsystemResourceRegistrationDmr(services, modelVersion);
>     }
> {code}
> Now run the test and delete it. The legacy .dmr file should be in {{target/test-classes/org/jboss/as/subsystem/test/<your-subsystem-name>-<your-version>.dmr}}. Copy this .dmr file to {{subsystem-test/framework/src/main/resources/org/jboss/as/subsystem/test}}.
> You will likely also need to update org.jboss.as.subsystem.test.KnownVersions to include your latest subsystem version, once you start doing real testing.
> Bear in mind that if you need to add some transformation to 7.2.0 due to some new feature in WildFly 8, you will probably also need to add the same transformation to 7.1.x as well!
> Although some subsystems already have added transformers, we still need to add tests.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list