Skip to content

refactor: remove deprecated 0.7.0 code #66

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

Closed
wants to merge 3 commits into from

Conversation

tzolov
Copy link
Contributor

@tzolov tzolov commented Mar 22, 2025

These changes are part of the planned deprecation cycle announced in 0.8.0, with the deprecated classes scheduled for removal in 0.9.0

  • Delete WebFluxSseServerTransport, WebMvcSseServerTransport, StdioServerTransport, and HttpServletSseServerTransport
  • Remove deprecated interfaces: ServerMcpTransport, ClientMcpTransport
  • Delete DefaultMcpSession implementation
  • Remove all deprecated test classes for the removed implementations
  • Update references to use McpServerTransport and McpClientTransport interfaces

These changes are part of the planned deprecation cycle announced in 0.8.0,
with the deprecated classes scheduled for removal in 0.9.0

- Delete WebFluxSseServerTransport, WebMvcSseServerTransport, StdioServerTransport, and HttpServletSseServerTransport
- Remove deprecated interfaces: ServerMcpTransport, ClientMcpTransport
- Delete DefaultMcpSession implementation
- Remove all deprecated test classes for the removed implementations
- Update references to use McpServerTransport and McpClientTransport interfaces

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
@tzolov tzolov added this to the 0.9.0 milestone Mar 22, 2025
@@ -71,7 +71,7 @@ public class McpSyncClient implements AutoCloseable {
*/
@Deprecated
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like this deprecation annotation is incorrect

Copy link
Member

Choose a reason for hiding this comment

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

It is correct. The intention was to allow us to hide the visibility in 0.9.0. We can also remove the deprecated javadoc note above now.

* interfaces.
*/
public class MockMcpTransport implements McpClientTransport, ServerMcpTransport {
public class MockMcpTransport implements McpClientTransport, McpServerTransport {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like we need to split the MockMcpTransport to client and server mocks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolved in the last commit

- Rename MockMcpTransport to MockMcpClientTransport in mcp/src/test
- Create new MockMcpServerTransport implementation
- Add MockMcpServerTransportProvider for server tests
- Mark MockMcpTransport in mcp-test module as deprecated
- Update all test classes to use the new implementations

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
@tzolov tzolov marked this pull request as ready for review March 24, 2025 21:40
Copy link
Member

@chemicL chemicL left a comment

Choose a reason for hiding this comment

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

Thanks! Overall all good, just two comments to address 👍

@@ -71,7 +71,7 @@ public class McpSyncClient implements AutoCloseable {
*/
@Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

It is correct. The intention was to allow us to hide the visibility in 0.9.0. We can also remove the deprecated javadoc note above now.

Comment on lines 58 to 61
return Mono.defer(() -> {
return Mono.empty();
});
}
Copy link
Member

Choose a reason for hiding this comment

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

No need for defer. return Mono.empty() is enough.

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
@tzolov
Copy link
Contributor Author

tzolov commented Mar 26, 2025

rebased, squashed and merged at 25f3bad

@tzolov tzolov closed this Mar 26, 2025
@tzolov tzolov deleted the delete-0.7.0-deprecations branch April 10, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants