WFCORE-87: CLI attributes to track the enable/disable events of deployments #161

Merged
merged 2 commits into from Sep 25, 2014

Projects

None yet

3 participants

@claudio4j
Contributor

No description provided.

@wildfly-ci

Windows Build 134 is now running using a merge of 76f3d34

@wildfly-ci

Linux Build 363 is now running using a merge of 76f3d34

@wildfly-ci

Windows Build 134 outcome was SUCCESS using a merge of 76f3d34
Summary: Tests passed: 2579, ignored: 56 Build time: 0:13:14

@wildfly-ci

Linux Build 363 outcome was FAILURE using a merge of 76f3d34
Summary: Tests failed: 13 (13 new), passed: 2573, ignored: 56 Build time: 0:14:49

Build problems:

Failed tests detected

Failed tests

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testHttpsRedirect: java.io.IOException: java.util.concurrent.CancellationException: Operation was cancelled
    at org.jboss.threads.AsyncFutureTask.operationCancelled(AsyncFutureTask.java:70)
    at org.jboss.threads.AsyncFutureTask.get(AsyncFutureTask.java:267)

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testHttpsRedirect: java.io.IOException: org.jboss.remoting3.NotOpenException: Cannot open new channel because close was initiated
    at org.jboss.remoting3.remote.RemoteConnectionHandler.handleOutboundChannelOpen(RemoteConnectionHandler.java:189)
    at org.jboss.remoting3.remote.RemoteConnectionHandler.open(RemoteConnectionHandler.java:318)

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testHTTPS: java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to remote://[::1]:9999. The connection failed
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testHTTPS: java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to remote://[::1]:9999. The connection failed
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testHTTP: java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to remote://[::1]:9999. The connection failed
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testHTTP: java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to remote://[::1]:9999. The connection failed
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testHTTPWithSecureInterface: java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to remote://[::1]:9999. The connection failed
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testHTTPWithSecureInterface: java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to remote://[::1]:9999. The connection failed
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testHTTPSWithSecureInterface: java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to remote://[::1]:9999. The connection failed
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testHTTPSWithSecureInterface: java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to remote://[::1]:9999. The connection failed
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

org.jboss.as.test.integration.domain.HTTPSManagementInterfaceTestCase.testNoHttpsRedirectWithSecureInterface: java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to remote://[::1]:9999. The connection failed
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)


##### there are 3 more failed tests, see build details
@wildfly-ci

Windows Build 135 is now running using a merge of 76f3d34

@wildfly-ci

Linux Build 364 is now running using a merge of 76f3d34

@wildfly-ci

Windows Build 135 outcome was SUCCESS using a merge of 76f3d34
Summary: Tests passed: 2579, ignored: 56 Build time: 0:13:09

@wildfly-ci

Linux Build 364 outcome was SUCCESS using a merge of 76f3d34
Summary: Tests passed: 2579, ignored: 56 Build time: 0:16:03

@bstansberry bstansberry commented on an outdated diff Sep 23, 2014
...server/controller/resources/DeploymentAttributes.java
@@ -110,6 +111,22 @@ public void marshallAsAttribute(AttributeDefinition attribute, ModelNode resourc
.setValidator(new EnumValidator<AbstractDeploymentUnitService.DeploymentStatus>(AbstractDeploymentUnitService.DeploymentStatus.class, false))
.build();
+ public static final SimpleAttributeDefinition ENABLED_TIME = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.ENABLED_TIME, ModelType.LONG, false)
@bstansberry
bstansberry Sep 23, 2014 Contributor

The allowNull param should be 'true' not 'false' as this will not have a value until the first deployment.

This comment applies to all 4 of these attributes.

@bstansberry bstansberry commented on an outdated diff Sep 23, 2014
...server/controller/resources/DeploymentAttributes.java
@@ -110,6 +111,22 @@ public void marshallAsAttribute(AttributeDefinition attribute, ModelNode resourc
.setValidator(new EnumValidator<AbstractDeploymentUnitService.DeploymentStatus>(AbstractDeploymentUnitService.DeploymentStatus.class, false))
.build();
+ public static final SimpleAttributeDefinition ENABLED_TIME = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.ENABLED_TIME, ModelType.LONG, false)
+ .setValidator(new StringLengthValidator(1, false))
@bstansberry
bstansberry Sep 23, 2014 Contributor

This should be removed as it's not a String.

But please add

.setMeasurementUnit(MeasurementUnit.MILLISECONDS)
.setStorageRuntime()
@bstansberry bstansberry commented on an outdated diff Sep 23, 2014
...server/controller/resources/DeploymentAttributes.java
@@ -110,6 +111,22 @@ public void marshallAsAttribute(AttributeDefinition attribute, ModelNode resourc
.setValidator(new EnumValidator<AbstractDeploymentUnitService.DeploymentStatus>(AbstractDeploymentUnitService.DeploymentStatus.class, false))
.build();
+ public static final SimpleAttributeDefinition ENABLED_TIME = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.ENABLED_TIME, ModelType.LONG, false)
+ .setValidator(new StringLengthValidator(1, false))
+ .build();
+
+ public static final SimpleAttributeDefinition ENABLED_TIMESTAMP = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.ENABLED_TIMESTAMP, ModelType.STRING, false)
+ .setValidator(new StringLengthValidator(1, false))
+ .build();
+
+ public static final SimpleAttributeDefinition DISABLED_TIME = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.DISABLED_TIME, ModelType.LONG, false)
+ .setValidator(new StringLengthValidator(1, false))
@bstansberry
bstansberry Sep 23, 2014 Contributor

This should be removed as it's not a String.

But please add

.setMeasurementUnit(MeasurementUnit.MILLISECONDS)
.setStorageRuntime()
@bstansberry bstansberry commented on an outdated diff Sep 23, 2014
...server/controller/resources/DeploymentAttributes.java
@@ -110,6 +111,22 @@ public void marshallAsAttribute(AttributeDefinition attribute, ModelNode resourc
.setValidator(new EnumValidator<AbstractDeploymentUnitService.DeploymentStatus>(AbstractDeploymentUnitService.DeploymentStatus.class, false))
.build();
+ public static final SimpleAttributeDefinition ENABLED_TIME = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.ENABLED_TIME, ModelType.LONG, false)
+ .setValidator(new StringLengthValidator(1, false))
+ .build();
+
+ public static final SimpleAttributeDefinition ENABLED_TIMESTAMP = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.ENABLED_TIMESTAMP, ModelType.STRING, false)
+ .setValidator(new StringLengthValidator(1, false))
@bstansberry
bstansberry Sep 23, 2014 Contributor

Please add

.setStorageRuntime()
@bstansberry bstansberry commented on an outdated diff Sep 23, 2014
...server/controller/resources/DeploymentAttributes.java
@@ -110,6 +111,22 @@ public void marshallAsAttribute(AttributeDefinition attribute, ModelNode resourc
.setValidator(new EnumValidator<AbstractDeploymentUnitService.DeploymentStatus>(AbstractDeploymentUnitService.DeploymentStatus.class, false))
.build();
+ public static final SimpleAttributeDefinition ENABLED_TIME = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.ENABLED_TIME, ModelType.LONG, false)
+ .setValidator(new StringLengthValidator(1, false))
+ .build();
+
+ public static final SimpleAttributeDefinition ENABLED_TIMESTAMP = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.ENABLED_TIMESTAMP, ModelType.STRING, false)
+ .setValidator(new StringLengthValidator(1, false))
+ .build();
+
+ public static final SimpleAttributeDefinition DISABLED_TIME = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.DISABLED_TIME, ModelType.LONG, false)
+ .setValidator(new StringLengthValidator(1, false))
+ .build();
+
+ public static final SimpleAttributeDefinition DISABLED_TIMESTAMP = SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.DISABLED_TIMESTAMP, ModelType.STRING, false)
+ .setValidator(new StringLengthValidator(1, false))
@bstansberry
bstansberry Sep 23, 2014 Contributor

Please add

.setStorageRuntime()
@bstansberry bstansberry commented on an outdated diff Sep 23, 2014
...a/org/jboss/as/server/deployment/DeploymentUtils.java
@@ -45,6 +49,11 @@
public final class DeploymentUtils {
/**
+ * Format used to display timestamp of enable/disable operations.
+ */
+ public static String DATEFORMAT_ATTR = "yyyy-MM-dd HH:mm:ss,SSS zzz";
@bstansberry
bstansberry Sep 23, 2014 Contributor

Not a big deal, but I would prefer if this constant and the new methods were package protected, not public, as I don't see usage outside the package.

@bstansberry
Contributor

Thanks for this; sorry I haven't had a chance to dig into it until today.

I was thinking the 'deployed' attributes would go back to 'undefined' when undeployed (and vice versa) but now I kind of like keeping the data around the way you have it here.

@wildfly-ci

Windows Build 210 is now running using a merge of f3dcf50

@wildfly-ci

Linux Build 462 is now running using a merge of f3dcf50

@wildfly-ci

Windows Build 210 outcome was SUCCESS using a merge of f3dcf50
Summary: Tests passed: 2588, ignored: 56 Build time: 0:13:29

@wildfly-ci

Linux Build 462 outcome was SUCCESS using a merge of f3dcf50
Summary: Tests passed: 2588, ignored: 56 Build time: 0:16:24

@claudio4j
Contributor

Thanks for the feedback. Hope have everything tidy now.

@bstansberry bstansberry merged commit 7771cb1 into wildfly:master Sep 25, 2014

1 check passed

default TeamCity Build WildFly Core :: Pull Request :: Pull request aggregator finished: Running
Details
@bstansberry
Contributor

Excellent. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment