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-6472 Remove obsolete remoting subsystem transformers and long deprecated resources/attributes #5644

Merged
merged 13 commits into from
Sep 25, 2023

Conversation

pferraro
Copy link
Contributor

@pferraro pferraro commented Sep 1, 2023

https://issues.redhat.com/browse/WFCORE-6472
https://issues.redhat.com/browse/WFCORE-6473

Resources and attributes deprecated since WF23 have been dropped. This includes the weird handling described in WFCORE-6473.
I've added an enumeration of supported model versions, to be referenced by future transformers.

This PR also adds new 6.0 version of schema that prunes obsolete elements/attributes for which there is no longer any model in which to persist.
The parser/writer for version 6.0 is now based on PersistentResourceXMLDescription, and the 6.0 schema simplified accordingly.
Subsystem tests have also been parameterized to accommodate future schema versions, so that testing of legacy schema parsing does not get dropped.
The worker attribute has been made required, rather than a hidden default, since this is a capability reference.

Requires wildfly/wildfly#17145 to fix wildfly full integration test failures. Merged.

@pferraro
Copy link
Contributor Author

pferraro commented Sep 1, 2023

wildfly full integration tests will likely fail, requiring wildfly/wildfly#17145

@github-actions github-actions bot added the deps-ok Dependencies have been checked, and there are no significant changes label Sep 1, 2023
@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly wildfly deleted a comment from wildfly-ci Sep 2, 2023
@wildfly wildfly deleted a comment from wildfly-ci Sep 2, 2023
@wildfly wildfly deleted a comment from wildfly-ci Sep 2, 2023
@pferraro pferraro requested a review from bstansberry September 2, 2023 14:43
@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@pferraro pferraro requested a review from fl4via September 5, 2023 21:59
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.

@pferraro @fl4via

I've made some minor review comments below. I think the biggest issue to discuss are the various breaking changes.

  1. The original WFCORE-6472 request; the legacy endpoint resource. As we discussed starting at WFCORE-6407 Deprecate non-default contructors from AbstractAddStepHandler and AbstractWriteAttributeHandler #5563 (comment) I think this is fine. It just removes an alternate view with no difference in runtime behavior.

  2. The remote outbound connection removal stuff. I think that should have a different JIRA. This I think needs good discussion as it is fairly large and is a behavior change. When GenericOutboundConnectionResourceDefinition and LocalOutboundConnectionResourceDefinition were deprecated the advice was to replace with RemoteOutboundConnectionResourceDefinition with the protocol configured. But now that is not possible as 'protocol' is removed, so users have to configure an authentication context. Looking at how that works I don't get the impression it is possible to set the protocol. I think we may be limited to remote+http.

  3. The removal of the default value for WORKER. You've handled that well with respect to domain mode and legacy schema parsing; the question here is if we're ok with breaking CLI scripts.

Thanks, Paul, for doing this as this extension was due for a general update.

<param name="http-connector" value="http-remoting-connector"/>
<param name="connector-ref" value="default"/>
<param name="sasl-authentication-factory" value="application-sasl-authentication"/>
</feature>
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 self:

This change requires https://github.com/wildfly/wildfly/pull/17145/files as that is where the remoting feature group used in full WF that provides the http-connector is configured. The 'remoting' feature group file here is not relevant in full WF.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct.

…/subsystem=remoting/configuration=endpoint will be removed.
* Drop problematic static references to resource definitions and add operation handlers.
* Replace racy write attribute handlers with ReloadRequiredWriteAttributeHandler
* Drop deprecated ServiceName alias
* OutboundConnection services do not provide the ServiceName associated with its RuntimeCapability.
* Consolidate redundant service implementations for URI-only connections.
Make RemotingSubsystem40Parser final to discourage any temptation to extend this class in the future.
…ources and attributes.

Migrate Namespace enum to RemotingSubsystemSchema enum.
Use PersistentResourceXMLDescription for parsing/writing 6.0 (and future) schemas.
Drop unnecessary use of non-standard attribute marshallers.
Parameterize subsystem test case to validate recent schemas.
…at require dependencies that are not avilable in wildfly-core.
@pferraro
Copy link
Contributor Author

Rebased against main.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

@wildfly-ci

This comment was marked as outdated.

.setDeprecatedSince(RemotingSubsystemModel.VERSION_4_0_0.getVersion())
);
}

@Override
public void registerChildren(ManagementResourceRegistration resourceRegistration) {
// TODO why does this resource have properties that are never referenced?
Copy link
Contributor

Choose a reason for hiding this comment

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

@pferraro @fl4via This dates to:

7281132

which came in as part of the big Elytron integration PR #2148

due to its incorporation of wildfly-security-incubator#37

The child is kind of deprecated because this resource is deprecated but I suppose it should be deprecatd on its own. And if we decided to undeprecate this and local-outbound-connection for sure we should deprecate the child.

@@ -40,38 +44,39 @@ class LocalOutboundConnectionResourceDefinition extends AbstractOutboundConnecti

static final PathElement ADDRESS = PathElement.pathElement(CommonAttributes.LOCAL_OUTBOUND_CONNECTION);

public static final SimpleAttributeDefinition OUTBOUND_SOCKET_BINDING_REF = new SimpleAttributeDefinitionBuilder(CommonAttributes.OUTBOUND_SOCKET_BINDING_REF, ModelType.STRING, false)
// TODO This is never used - why is it required?
Copy link
Contributor

Choose a reason for hiding this comment

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

@pferraro @fl4via This dates to:

7281132

which came in as part of the big Elytron integration PR #2148

due to its incorporation of wildfly-security-incubator#37

I guess the local: protocol used to involve a host name in its URIs, but no longer does.

If this resource survives this attribute should be deprecated and made optional.

Copy link
Contributor

Choose a reason for hiding this comment

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

It also shouldn't allow expressions :)

context.removeService(serviceName); // safe even if the service doesn't exist
// install the service with new values
LocalOutboundConnectionAdd.INSTANCE.installRuntimeService(context, fullModel);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Big +1 to getting rid of this.

}

return reloadRequired;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Big +1 to getting rid of this.

// local outbound connection
subsystem.registerSubModel(LocalOutboundConnectionResourceDefinition.INSTANCE);
subsystem.registerSubModel(new LocalOutboundConnectionResourceDefinition());
// (generic) outbound connection
subsystem.registerSubModel(new GenericOutboundConnectionResourceDefinition());
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO -- this children wiring should be moved out of the Extension impl.

@yersan yersan added the ready-for-merge This PR is ready to be merged and fulfills all requirements label Sep 25, 2023
@yersan yersan merged commit cdfabc4 into wildfly:main Sep 25, 2023
1 check passed
@yersan
Copy link
Collaborator

yersan commented Sep 25, 2023

Thanks @fl4via @pferraro and @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 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