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-6503]:Add support for unmanaged deployments with YAML extension. #5860
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
826b453
to
18a3f13
Compare
For WARN message it seems to be logging some null values. For example:
for yaml:
I should log the name of yaml tag which is ignored. |
d00ce87
to
3d5976c
Compare
controller/src/main/java/org/jboss/as/controller/logging/ControllerLogger.java
Outdated
Show resolved
Hide resolved
cf04996
to
fd8e69e
Compare
c6dcfa8
to
b3b2923
Compare
This comment was marked as outdated.
This comment was marked as outdated.
controller/src/main/java/org/jboss/as/controller/logging/ControllerLogger.java
Outdated
Show resolved
Hide resolved
Hello @bstansberry, you added "Feature" and "missing-reqs" labels to this PR. So far we are treating this as an enhancement, do you want this to be treated as a Feature Request instead? There is more information about this on the Jira. |
Core -> Full Integration Build 13373 outcome was FAILURE using a merge of 34bacd1 Failed tests
|
Core -> Full Integration Build 13666 outcome was FAILURE using a merge of 04fa197 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.
Added some comments to think about whether some stuff that could be moved to simply a bit the changes on the reload handlers and ModelControllerImpl, they can be evolved later, but it took me some time to figure out why we needed them.
In general, it looks pretty isolated to yaml work, so, except the additional trailing white space on the --yaml option, looks good and I think we can go with them. However, if possible, we should move the conditions added on reload handlers and ModelControllerImpl to the ConfigurationExtension.shouldProcessOperations.
default boolean hasStored() { | ||
return false; | ||
} |
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.
isStored() looks like a more natural choice, but up to you
testsuite/test-runner/src/main/java/org/wildfly/core/testrunner/Server.java
Outdated
Show resolved
Hide resolved
...test/manualmode/management/persistence/yaml/test-remove-attribute-removes-above-resource.yml
Outdated
Show resolved
Hide resolved
config.remove(excluded); | ||
boolean isPresent = config.containsKey(excluded); | ||
Object value = config.remove(excluded); | ||
if (value != null && value instanceof Map && DEPLOYMENT.equals(excluded)) { |
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.
Minor: but value != null
is not necessary here since it is protected by the instanceof operator
controller/src/main/java/org/jboss/as/controller/ModelControllerImpl.java
Outdated
Show resolved
Hide resolved
@@ -17,6 +17,7 @@ public class RunningModeControl { | |||
private volatile boolean useCurrentConfig; | |||
private volatile String newBootFileName; | |||
private volatile Boolean suspend; | |||
private volatile boolean applyConfigurationExtension; |
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.
RunningModeControl has evolved keeping more stuff than only the required information to provide control over the server's current RunningMode. However, instead of adding information on whether the configuration extensions should be applied, wouldn't be easier if we just save here the value of extensibleConfigurationPersister.hasStored()?
With this information and the other field values we could derive in ConfigurationExtension.shouldProcessOperations()
whether the yaml configuration should be applied again after a reload.
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 don't really understand what you are proposing there :) The persister is not persisted between reloads
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.
@ehsavoie I mean, move all the logic that calculates the applyConfigurationExtension
from the reload handler to ConfigExtension.shouldProcessOperations()
method and instead save in the RunningModeControl the flag that indicates the persistent storage has been stored. e.g extensibleConfigurationPersister.hasStored() value.
With the RunningModeControl class field values you should be able to calculate on ConfigExtension.shouldProcessOperations()
whether the YAML operations should be loaded again.
Understanding the logic and purpose of applyConfigurationExtension
calculation by looking at the handlers is a bit unclear, if you prefer to keep what you currently have, at least write a java doc explaining the applyConfigurationExtension purpose and meaning on RunningModeControl accessors.
Out of curiosity, I am not sure how the stored method is invoked even when we are using a read-only configuration file policy, but, if the user writes something after reloading, all the configuration, including those derived from the YAML files, will be available from the persistent storage? I understand that's the reason why you don't want to apply the YAML config again to do not overwrite any modification done after the previous reloading
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.
When we are in read-only mode the changes are persisted to the standalone-boot.xml so that when you reload you keep them. That's when the store method is invoked.
When you start or restart the standalone-boot.xml is overwritten by the standalone.xml.
@bstansberry @yersan I've rebased on #5934 so only the feature part where unmanaged deployments are supported is here now. |
@bstansberry I removed the feature label due to the https://issues.redhat.com/browse/WFCORE-6503 comments. That probably was a mistake since you added them after the Jira discussions. Just to be clear, do you want to treat this as a pure feature request instead of an enhancement that adds more value to a released feature request? |
Core -> Full Integration Build 13686 outcome was FAILURE using a merge of d1d9329 Failed tests
|
Core -> Full Integration Build 13700 outcome was FAILURE using a merge of d1d9329 Failed tests
|
/retest |
* checking that the YAML deployment is unmanaged. * adding the unmanaged deployment to the list of operations * adding some light testing on this Jira: https://issues.redhat.com/browse/WFCORE-6503 Proposal: wildfly/wildfly-proposals#554 Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
Jira: https://issues.redhat.com/browse/WFCORE-6503
Proposal: wildfly/wildfly-proposals#554