Skip to content
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

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

ehsavoie
Copy link
Contributor

@ehsavoie ehsavoie commented Feb 14, 2024

  • checking that the YAML deployment is unmanaged.
  • adding the unmanaged deployment to the list of operations
  • adding some light esting on this

Jira: https://issues.redhat.com/browse/WFCORE-6503
https://issues.redhat.com/browse/WFLY-19442
Proposal: wildfly/wildfly-proposals#554
Documenation PR: wildfly/wildfly#17970

@ehsavoie ehsavoie marked this pull request as ready for review February 14, 2024 13:57
@github-actions github-actions bot added the deps-ok Dependencies have been checked, and there are no significant changes label Feb 14, 2024
@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@mnovak1
Copy link
Contributor

mnovak1 commented Feb 29, 2024

For WARN message it seems to be logging some null values. For example:

 is ignored
09:46:09,663 WARN  [org.jboss.as.controller.management-operation] (main) WFLYCTL0506: The yaml element org.jboss.as.failure: {module: org.jboss.as.failure}
 is ignored
09:46:09,664 WARN  [org.jboss.as.controller.management-operation] (main) WFLYCTL0506: The yaml element null
 is ignored

for yaml:

wildfly-configuration:
    extension:
      org.jboss.as.failure:
        module: org.jboss.as.failure
    socket-binding-group:
        standard-sockets:
          default-interface: public
          port-offset: ${jboss.socket.binding.port-offset:0}
          socket-binding:
              http:
                interface: public
              https:
          remote-destination-outbound-socket-binding:
            mail-snmt:  
              host: foo
              port: 8081
            foo2:
              host: foo2
              port: 8082

I should log the name of yaml tag which is ignored.

@ehsavoie ehsavoie force-pushed the WFCORE-6503 branch 2 times, most recently from d00ce87 to 3d5976c Compare March 1, 2024 10:44
@ehsavoie ehsavoie force-pushed the WFCORE-6503 branch 2 times, most recently from cf04996 to fd8e69e Compare March 1, 2024 16:01
@ehsavoie ehsavoie force-pushed the WFCORE-6503 branch 6 times, most recently from c6dcfa8 to b3b2923 Compare March 13, 2024 13:03
@wildfly-ci

This comment was marked as outdated.

@bstansberry bstansberry added Feature This PR adds a new feature to WildFly missing-reqs This PR is missing external requirements before it can be merged labels Mar 18, 2024
@yersan
Copy link
Collaborator

yersan commented Mar 19, 2024

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.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@yersan yersan removed the Feature This PR adds a new feature to WildFly label Apr 3, 2024
@yersan yersan removed the missing-reqs This PR is missing external requirements before it can be merged label Apr 3, 2024
Copy link
Collaborator

@yersan yersan left a 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.

@ehsavoie
Copy link
Contributor Author

ehsavoie commented Apr 5, 2024

@bstansberry @yersan I've rebased on #5934 so only the feature part where unmanaged deployments are supported is here now.

@yersan
Copy link
Collaborator

yersan commented Apr 5, 2024

@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?

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@yersan
Copy link
Collaborator

yersan commented Apr 26, 2024

/retest

@yersan yersan added Feature This PR adds a new feature to WildFly missing-reqs This PR is missing external requirements before it can be merged labels Jun 4, 2024
@wildfly-ci

This comment was marked as outdated.

@yersan yersan removed the missing-reqs This PR is missing external requirements before it can be merged label Jun 25, 2024
OperationEntry operationEntry = rootRegistration.getOperationEntry(PathAddress.pathAddress("deployment", name), ADD);
if (deployment.getValue() != null && deployment.getValue() instanceof Map) {
Map<String, Object> attributes = (Map<String, Object>) deployment.getValue();
Map<String, Object> content = (Map<String, Object>) (((Iterable<? extends Object>) attributes.get("content")).iterator().next());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can NPE if there is no 'content' and fail in other confusing ways if it's not a list or an empty list.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing that as it is only for validation purpose

Path[] supplementalConfigurationFiles = findSupplementalConfigurationFiles(null, supplementalConfiguration);
ConfigurationExtension configurationExtension = ConfigurationExtensionFactory.createConfigurationExtension(supplementalConfigurationFiles);
if (configurationExtension != null) {
configInteractionPolicy = configurationExtension.shouldProcessOperations(runningModeControl) ? ConfigurationFile.InteractionPolicy.READ_ONLY : configInteractionPolicy;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to reviewers:

The configInteractionPolicy var is never read in this branch, making the assignment here pointless and thus the other removed lines pointless as well.

There are uses of the var in other branches.

@bstansberry
Copy link
Contributor

@yersan Sorry for not answering your questions until now. This is new user controllable behavior so it's a feature. We should communicate that to WF users by using Feature Request issue type. It's been validated as part of validating the earlier YAML work, so once code review stuff comments here are addressed by @ehsavoie this can be merged.

…ion.

* checking that the YAML deployment is unmanaged.
* adding the unmanaged deployment to the list of operations
* adding some light testing on this
* fixing issue WFCORE-6857 where you couldn't enable an unmanaged
  deployment with yaml

Jira: https://issues.redhat.com/browse/WFCORE-6503
      https://issues.redhat.com/browse/WFCORE-6857
Proposal: wildfly/wildfly-proposals#554

Signed-off-by: Emmanuel Hugonnet <[email protected]>
@wildfly-ci

This comment was marked as off-topic.

Copy link
Contributor

@bstansberry bstansberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yersan This LGTM.

Copy link
Collaborator

@yersan yersan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for helping with the review @bstansberry .
The points I reviewed were finally moved to a different issue and were already merged. I've checked it again and I have no more questions.

There is still pending paperwork on the RFE Jira that I guess, still prevents merging this.

@yersan yersan added the ready-for-merge This PR is ready to be merged and fulfills all requirements label Jun 28, 2024
@yersan yersan merged commit c9aa242 into wildfly:main Jun 28, 2024
10 of 12 checks passed
@yersan
Copy link
Collaborator

yersan commented Jun 28, 2024

RFE pending paperwork was resolved, so merging this

@yersan
Copy link
Collaborator

yersan commented Jun 28, 2024

Thanks @ehsavoie @mnovak1 @bstansberry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps-ok Dependencies have been checked, and there are no significant changes Feature This PR adds a new feature to WildFly ready-for-merge This PR is ready to be merged and fulfills all requirements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants