[WFCORE-6096] ModelTestModelControllerService does not set error when init capabilities are missing
https://issues.redhat.com/browse/WFCORE-6096
Hello, cam-rod. I'm waiting for one of the admins to verify this patch with /ok-to-test in a comment.
/ok-to-test
@cam-rod @yersan This is ok as is, at it does what I requested at https://issues.redhat.com/browse/WFCORE-6090?focusedCommentId=21122596&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-21122596
I've thought about it a bit and this would be really helpful:
-
Make BootErrorCollector.getErrors() package protected. (BTW, I think the entire class can and should be package protected, but if there's some outside use I've missed, then never mind.)
-
Add to AbstractControllerService a 'protected final ModelNode getBootErrors()' that just exposes the BEC.getErrors() result.
-
Create a new private static subclass of OperationFailedException in ModelTestControllerService. Instead of throwing your unknownBootFailure constant, create and throw an instance of it using the result from the new getBootErrors(). In waitForSetup use an instance of check.
Again, though, I think this is fine as is, as it solves the reported problem.
@bstansberry Alright, I can try to implement those features as well. Semi-related, I haven't been to run the integration tests on Windows to check the failing build. Running the integration-tests.bat file as mentioned here seems to result in a filepath error:
$ cd wildfly
$ integration-tests.bat
Calling "\Users\osd-test\wildfly\\mvn.cmd" -Dmaven.user.home \Users\osd-test\wildfly\\tools install -Dintegration.module -Dsmoke.integration.tests
'"\Users\osd-test\wildfly\\mvn.cmd"' is not recognized as an internal or external command,
operable program or batch file.
Running mvn install does work, however. Does this point to any obvious mistakes in my Windows setup?
@cam-rod I don't think I've ever used those integrations-tests scripts. :). And haven't used build.sh in ages either. I just do 'mvn'. Just doing that is fine.
That said, my guess is the problem is here:
https://github.com/wildfly/wildfly/blob/main/integration-tests.bat#L40
That should be 'mvnw.cmd' as that's the name of the file in the root of the source tree, not 'mvnw.cmd'.
I don't have a ton of confidence it will work well if you fix that though, as I suspect that has been broken since WFLY-7963 was merged in January 2017. So who knows what shape that script is in.
Core -> Full Integration Build 11817 outcome was FAILURE using a merge of 2f6c4888b87a2329c8087a6e026f073a1f8c14d3 Summary: Exit code 1 (Step: Build & test full (Maven)) (new) Build time: 00:03:28
~~Seems that the tests run without issue on the WFLY 27.0.0.Final tag and latest WFCORE, so rebasing. Might need to rerun once the WFLY main branch issue is resolved.~~
Issue has reappeared after another run, still debugging.
Core -> WildFly Preview Integration Build 11960 outcome was FAILURE using a merge of 2f6c4888b87a2329c8087a6e026f073a1f8c14d3 Summary: Exit code 1 (Step: Build & test full (Maven)) (new) Build time: 00:05:55
Core -> Full Integration Build 11994 outcome was FAILURE using a merge of 2f6c4888b87a2329c8087a6e026f073a1f8c14d3 Summary: Tests passed: 1472, ignored: 51; exit code 1 (Step: Build & test full (Maven)) (new) Build time: 00:11:55
Hi @cam-rod ,
Issue has reappeared after another run, still debugging.
Much better if you convert it to a draft PR. CI will be executed, but it let us know that your issue is still in progress.
There has been no activity on this PR for 45 days. It will be auto-closed after 90 days.
Still planning to merge this change, but it likely won't be for a few weeks
Core -> Full Integration Build 12216 outcome was UNKNOWN using a merge of e1d19c226c2243f7ff3eb9fba9c62e14fecd0edc Summary: Canceled (Tests passed: 6871, ignored: 107; exit code 143 (Step: Build & test full (Maven)) (new); unexpected error: java.lang.RuntimeException: Failed to create context for build runner: Error creating bean with name 'jetbrains.buildServer.agent.imp... Build time: 03:01:49
Started looking into the build issues last week, but it seems that it passed all checks after the most recent rebase so submitting for review.
@cam-rod @yersan This is ok as is, at it does what I requested at https://issues.redhat.com/browse/WFCORE-6090?focusedCommentId=21122596&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-21122596
I've thought about it a bit and this would be really helpful:
- Make BootErrorCollector.getErrors() package protected. (BTW, I think the entire class can and should be package protected, but if there's some outside use I've missed, then never mind.)
- Add to AbstractControllerService a 'protected final ModelNode getBootErrors()' that just exposes the BEC.getErrors() result.
- Create a new private static subclass of OperationFailedException in ModelTestControllerService. Instead of throwing your unknownBootFailure constant, create and throw an instance of it using the result from the new getBootErrors(). In waitForSetup use an instance of check.
Again, though, I think this is fine as is, as it solves the reported problem.
@bstansberry should I move these into a new issue to consider later?
@cam-rod Re my suggestions above -- it's fine to defer those to a separate issue if doing them isn't necessary to address any questions about this PR raised by @yersan.
There has been no activity on this PR for 45 days. It will be auto-closed after 90 days.
Core -> Full Integration Build 12477 outcome was UNKNOWN using a merge of 29fdaa3c69f54bf581aceb28982b1a691f048e12 Summary: Canceled (Tests passed: 5826, ignored: 82; exit code 143 (Step: Build & test full (Maven)) (new)) Build time: 01:23:20
Core -> WildFly Preview Integration Build 12373 outcome was UNKNOWN using a merge of 29fdaa3c69f54bf581aceb28982b1a691f048e12 Summary: Canceled (Tests passed: 2419, ignored: 19; exit code 143 (Step: Build & test full (Maven)) (new)) Build time: 01:24:06
Core -> WildFly Preview Integration Build 12374 outcome was UNKNOWN using a merge of 29fdaa3c69f54bf581aceb28982b1a691f048e12 Summary: Canceled Build time: 00:00:01
Core -> WildFly Preview Integration Build 12375 outcome was UNKNOWN using a merge of 29fdaa3c69f54bf581aceb28982b1a691f048e12 Summary: Canceled Build time: 00:00:02
Core -> WildFly Preview Integration Build 12376 outcome was UNKNOWN using a merge of 29fdaa3c69f54bf581aceb28982b1a691f048e12 Summary: Canceled Build time: 00:00:02
Core -> Full Integration Build 12276 outcome was UNKNOWN using a merge of 29fdaa3c69f54bf581aceb28982b1a691f048e12 Summary: Canceled (Tests passed: 1817, ignored: 31; Step 5/6) Build time: 02:27:07
Core -> Full Integration Build 12478 outcome was UNKNOWN using a merge of 29fdaa3c69f54bf581aceb28982b1a691f048e12 Summary: Canceled (Tests passed: 4596, ignored: 70; Step 5/6) Build time: 03:54:21
Core -> WildFly Preview Integration Build 12523 outcome was FAILURE using a merge of 29fdaa3c69f54bf581aceb28982b1a691f048e12 Summary: Exit code 1 (Step: Build & test full (Maven)) Build time: 00:03:36
FYI @cam-rod finally it got a conflict
sorry @yersan, meant to respond yesterday. I've created WFCORE-6383 to implement the changes suggested by @bstansberry. (edit: also updating the reviewed sections)
Core -> Full Integration Build 12461 outcome was FAILURE using a merge of 1efbb9bf0c2dd74d6cfd2e9487b25db49ab62927 Summary: Tests failed: 1 (1 new), passed: 4018, ignored: 64 Build time: 02:00:13
Failed tests
org.wildfly.test.integration.microprofile.faulttolerance.micrometer.FaultToleranceMicrometerIntegrationTestCase(layers-test).checkCounter: java.lang.AssertionError: expected:<2.0> but was:<0.0>
at deployment.FaultToleranceMicrometerIntegrationTestCase.war//org.wildfly.test.integration.microprofile.faulttolerance.micrometer.FaultToleranceMicrometerIntegrationTestCase.checkCounter(FaultToleranceMicrometerIntegrationTestCase.java:96)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at deployment.arquillian-service//org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.doRunTestMethod(ArquillianService.java:204)
at deployment.arquillian-service//org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:179)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at jdk.internal.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at [email protected]//org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:1499)
at [email protected]//org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:731)
at [email protected]//org.jboss.as.jmx.BlockingNotificationMBeanServer.invoke(BlockingNotificationMBeanServer.java:168)
at [email protected]//org.jboss.as.jmx.AuthorizingMBeanServer.invoke(AuthorizingMBeanServer.java:258)
at [email protected]//org.jboss.remotingjmx.protocol.v2.ServerProxy$InvokeHandler.handle(ServerProxy.java:950)
Core -> Full Integration Build 12666 outcome was FAILURE using a merge of 1efbb9bf0c2dd74d6cfd2e9487b25db49ab62927 Summary: Tests failed: 2 (2 new), passed: 7169, ignored: 133 Build time: 03:52:54
Failed tests
org.jboss.as.test.integration.xerces.unit.XercesUsageTestCase(basic-integration-default-web): org.jboss.as.test.integration.xerces.unit.XercesUsageTestCase(basic-integration-default-web).org.jboss.as.test.integration.xerces.unit.XercesUsageTestCase: java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.spec.EnterpriseArchive org.jboss.as.test.integration.xerces.unit.XercesUsageTestCase.createDeployment() throws java.io.IOException
at jdk.internal.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at jdk.internal.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at jdk.internal.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
... 50 more
Caused by: org.jboss.shrinkwrap.resolver.api.InvalidConfigurationFileException: Found 1 problems while building POM model from /opt/buildAgent/work/e8e0dd9c7c4ba60/full/testsuite/integration/basic/pom.xml
1/ [FATAL] Non-resolvable parent POM for org.wildfly:wildfly-parent:29.0.0.Alpha1-SNAPSHOT: Failed to resolve POM for org.jboss:jboss-parent:39 due to Could not transfer artifact org.jboss:jboss-parent:pom:39 from/to central (https://repo1.maven.org/maven2): Error transferring file: Network is unreachable (connect failed) and 'parent.relativePath' points at no local POM @ org.wildfly:wildfly-parent:29.0.0.Alpha1-SNAPSHOT, /opt/buildAgent/work/e8e0dd9c7c4ba60/full/pom.xml
at org.jboss.shrinkwrap.resolver.impl.maven.MavenWorkingSessionImpl.loadPomFromFile(MavenWorkingSessionImpl.java:176)
at org.jboss.shrinkwrap.resolver.impl.maven.task.LoadPomTask.execute(LoadPomTask.java:84)
at org.jboss.shrinkwrap.resolver.impl.maven.PomlessResolveStageBaseImpl.loadPomFromFile(PomlessResolveStageBaseImpl.java:93)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenResolverSystemBaseImpl.loadPomFromFile(MavenResolverSystemBaseImpl.java:154)
at org.jboss.as.test.integration.xerces.unit.XercesUsageTestCase.createDeployment(XercesUsageTestCase.java:91)
... 55 more
org.jboss.as.test.integration.xerces.ws.unit.XercesUsageInWebServiceTestCase(basic-integration-default-web): org.jboss.as.test.integration.xerces.ws.unit.XercesUsageInWebServiceTestCase(basic-integration-default-web).org.jboss.as.test.integration.xerces.ws.unit.XercesUsageInWebServiceTestCase: java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.spec.WebArchive org.jboss.as.test.integration.xerces.ws.unit.XercesUsageInWebServiceTestCase.createWebServiceDeployment() throws java.io.IOException
at jdk.internal.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at jdk.internal.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at jdk.internal.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
... 50 more
Caused by: org.jboss.shrinkwrap.resolver.api.InvalidConfigurationFileException: Found 1 problems while building POM model from /opt/buildAgent/work/e8e0dd9c7c4ba60/full/testsuite/integration/basic/pom.xml
1/ [FATAL] Non-resolvable parent POM for org.wildfly:wildfly-parent:29.0.0.Alpha1-SNAPSHOT: Failed to resolve POM for org.jboss:jboss-parent:39 due to Could not transfer artifact org.jboss:jboss-parent:pom:39 from/to central (https://repo1.maven.org/maven2): Error transferring file: Network is unreachable (connect failed) and 'parent.relativePath' points at no local POM @ org.wildfly:wildfly-parent:29.0.0.Alpha1-SNAPSHOT, /opt/buildAgent/work/e8e0dd9c7c4ba60/full/pom.xml
at org.jboss.shrinkwrap.resolver.impl.maven.MavenWorkingSessionImpl.loadPomFromFile(MavenWorkingSessionImpl.java:176)
at org.jboss.shrinkwrap.resolver.impl.maven.task.LoadPomTask.execute(LoadPomTask.java:84)
at org.jboss.shrinkwrap.resolver.impl.maven.PomlessResolveStageBaseImpl.loadPomFromFile(PomlessResolveStageBaseImpl.java:93)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenResolverSystemBaseImpl.loadPomFromFile(MavenResolverSystemBaseImpl.java:154)
at org.jboss.as.test.integration.xerces.ws.unit.XercesUsageInWebServiceTestCase.createWebServiceDeployment(XercesUsageInWebServiceTestCase.java:81)
... 55 more
Thanks @cam-rod and @yersan