-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WFCORE-6981] fix incorrect alternatives in reply-properties inherited from basis attribute #6228
Conversation
Core -> WildFly Preview Integration Build 14084 outcome was FAILURE using a merge of f29af68 Failed tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @soul2zimate
This is a partial fix, there are several operations that have this issue. We are getting these alternatives because the CONTENT_HASH attribute is already built with those alternatives in place:
wildfly-core/server/src/main/java/org/jboss/as/server/controller/resources/DeploymentAttributes.java
Lines 155 to 159 in e4bedf5
public static final SimpleAttributeDefinition CONTENT_HASH = | |
createContentValueTypeAttribute(ModelDescriptionConstants.HASH, ModelType.BYTES, new HashValidator(true), false, | |
ModelDescriptionConstants.INPUT_STREAM_INDEX, ModelDescriptionConstants.BYTES, ModelDescriptionConstants.URL, | |
ModelDescriptionConstants.PATH, ModelDescriptionConstants.RELATIVE_TO, ModelDescriptionConstants.EMPTY) | |
.build(); |
If we look at that file, we can see several attributes that are created with those alternatives in place. So, this PR is a partial fix only for the usage of CONTENT_HASH in the UPLOAD_HASH_REPLY operation only/
The question is more why those attributes were created with all of those alternatives if they can end up as a single attribute in one operation. I don't know, but in such a case, the alternatives should be removed. Maybe @ehsavoie could remember.
So, I guess we need to perform a full check of those attributes and remove the alternatives when required in the Operation handlers where they are used, or, maybe fix their definition by adding them without alternatives and adding them when more than one is added to the same Operation.
Hello @yersan, AFAIU, I need to check the usage of this e.g. https://github.com/wildfly/wildfly-core/blob/27.0.0.Beta1/logging/src/main/java/org/jboss/as/logging/handlers/SocketHandlerResourceDefinition.java#L84-L89 and https://github.com/wildfly/wildfly-core/blob/27.0.0.Beta1/logging/src/main/java/org/jboss/as/logging/handlers/SyslogHandlerResourceDefinition.java#L116 |
You need all the alternative in the operation parameters but I think the issue was in the reply attribute that was created based on the parameter instead of the parameter name + type. I think it is getting more details from the parameter which shouldn't be defined there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see it now @soul2zimate , the UPLOAD_HASH_REPLY is used as a common structure for the reply parameters of all the upload_XXXX operations, but it was inheriting the alternative attributes from the CONTENT_HASH, hence the problem with the alternatives being leaked into the reply parameters
Thanks @soul2zimate and @ehsavoie |
Issue: https://issues.redhat.com/browse/WFCORE-6981
[WFCORE-6981] fix incorrect alternatives in
reply-properties
inherited from basis attribute