Skip to content

[type:refactor] remove motan support#6307

Open
Aias00 wants to merge 5 commits intomasterfrom
codex/remove-motan
Open

[type:refactor] remove motan support#6307
Aias00 wants to merge 5 commits intomasterfrom
codex/remove-motan

Conversation

@Aias00
Copy link
Copy Markdown
Contributor

@Aias00 Aias00 commented Mar 29, 2026

Summary

  • remove Motan client, plugin, starters, examples, e2e cases, and integrated test modules
  • clean Motan references from current SQL/bootstrap metadata, CI workflows, and release docs
  • add a regression test to ensure removed Motan-specific result codes do not reappear

Test Plan

  • ./mvnw -pl shenyu-plugin/shenyu-plugin-api -Dtest=ShenyuResultEnumTest test
  • ./mvnw -DskipTests compile

Copilot AI review requested due to automatic review settings March 29, 2026 07:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes Motan RPC support from Apache ShenYu, including the Motan client, plugins/starters, example & integrated-test modules, Kubernetes ingress Motan handling, and related metadata/CI/doc references, and adds a regression test to prevent reintroducing Motan-specific result codes.

Changes:

  • Remove Motan modules (client, plugin, Spring Boot starters), plus associated unit/integration/e2e tests and examples.
  • Remove Motan references from RPC type enums, plugin enums/adapters, k8s ingress handling, admin SQL seed metadata, CI workflows, and release docs.
  • Add DB upgrade scripts to delete Motan plugin/config data and add a regression test guarding against the removed Motan result code.

Reviewed changes

Copilot reviewed 131 out of 131 changed files in this pull request and generated no comments.

Show a summary per file
File Description
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-motan/src/test/java/org/apache/shenyu/springboot/starter/plugin/motan/MotanPluginConfigurationTest.java Remove Motan starter plugin auto-config test.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-motan/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports Remove Motan starter auto-configuration import.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-motan/src/main/resources/META-INF/spring.provides Remove Motan starter “provides” metadata.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-motan/src/main/resources/META-INF/spring.factories Remove Motan starter legacy auto-config entry.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-motan/src/main/java/org/apache/shenyu/springboot/starter/plugin/motan/MotanPluginConfiguration.java Remove Motan plugin Spring configuration.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-motan/pom.xml Remove Motan starter module POM.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/pom.xml Drop Motan starter module from build.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-motan/src/test/java/org/apache/shenyu/springboot/starter/client/motan/ShenyuMotanClientConfigurationTest.java Remove Motan client starter test.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-motan/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports Remove Motan client starter auto-config import.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-motan/src/main/resources/META-INF/spring.provides Remove Motan client starter “provides” metadata.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-motan/src/main/resources/META-INF/spring.factories Remove Motan client starter legacy auto-config entry.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-motan/src/main/java/org/apache/shenyu/springboot/starter/client/motan/property/ShenyuMotanConfig.java Remove Motan client starter config properties.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-motan/src/main/java/org/apache/shenyu/springboot/starter/client/motan/property/RegistryConfig.java Remove Motan registry config properties.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-motan/src/main/java/org/apache/shenyu/springboot/starter/client/motan/ShenyuMotanClientConfiguration.java Remove Motan client starter configuration.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-motan/pom.xml Remove Motan client starter module POM.
shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/pom.xml Drop Motan client starter module from build.
shenyu-register-center/shenyu-register-common/src/main/java/org/apache/shenyu/register/common/enums/RegisterTypeEnum.java Remove Motan register type enum entry.
shenyu-register-center/shenyu-register-common/src/main/java/org/apache/shenyu/register/common/dto/ApiDocRegisterDTO.java Remove Motan from rpcType documentation string.
shenyu-plugin/shenyu-plugin-response/src/test/java/org/apache/shenyu/plugin/response/ResponsePluginTest.java Remove Motan RPC type from response plugin tests.
shenyu-plugin/shenyu-plugin-response/src/main/java/org/apache/shenyu/plugin/response/strategy/RPCMessageWriter.java Remove Motan from supported RPC writer types.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-transform/src/main/java/org/apache/shenyu/plugin/transform/RpcParamTransformPlugin.java Remove Motan from transform plugin skip list.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/test/java/org/apache/shenyu/plugin/motan/proxy/MotanProxyServiceTest.java Remove Motan proxy service test.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/test/java/org/apache/shenyu/plugin/motan/handler/MotanPluginDataHandlerTest.java Remove Motan plugin data handler test.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/test/java/org/apache/shenyu/plugin/motan/context/MotanShenyuContextDecoratorTest.java Remove Motan context decorator test.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/test/java/org/apache/shenyu/plugin/motan/cache/ApplicationConfigCacheTest.java Remove Motan application config cache test.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/test/java/org/apache/shenyu/plugin/motan/MotanPluginTest.java Remove Motan plugin test.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/util/PrxInfoUtil.java Remove Motan utility class.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/proxy/MotanProxyService.java Remove Motan proxy service implementation.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/handler/MotanPluginDataHandler.java Remove Motan plugin data handler implementation.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/handler/MotanMetaDataHandler.java Remove Motan metadata handler.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/context/MotanShenyuContextDecorator.java Remove Motan ShenyuContextDecorator implementation.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/MotanPlugin.java Remove Motan plugin implementation.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-motan/pom.xml Remove Motan plugin module POM.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-general-context/src/main/java/org/apache/shenyu/plugin/general/context/GeneralContextPlugin.java Remove Motan from general-context supported RPC types.
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/pom.xml Drop Motan plugin module from build.
shenyu-plugin/shenyu-plugin-api/src/test/java/org/apache/shenyu/plugin/api/result/ShenyuResultEnumTest.java Replace former Motan util test with regression test guarding removed Motan result code.
shenyu-plugin/shenyu-plugin-api/src/main/java/org/apache/shenyu/plugin/api/result/ShenyuResultEnum.java Remove Motan-specific result enum value.
shenyu-kubernetes-controller/src/test/java/org/apache/shenyu/k8s/MotanReconcilerTest.java Remove Motan ingress reconciler test.
shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/reconciler/IngressReconciler.java Remove Motan annotation handling and plugin config generation.
shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/IngressParser.java Remove Motan ingress parsing path.
shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/common/IngressConstants.java Remove Motan ingress annotation constants.
shenyu-integrated-test/shenyu-integrated-test-motan/src/test/java/org/apache/shenyu/integrated/test/motan/MotanPluginTest.java Remove Motan integrated test case.
shenyu-integrated-test/shenyu-integrated-test-motan/src/test/java/org/apache/shenyu/integrated/test/motan/MotanPluginShareThreadPoolTest.java Remove Motan shared-thread-pool integrated test.
shenyu-integrated-test/shenyu-integrated-test-motan/src/main/resources/application.yml Remove Motan integrated-test app config.
shenyu-integrated-test/shenyu-integrated-test-motan/src/main/resources/application-local.yml Remove Motan integrated-test local config.
shenyu-integrated-test/shenyu-integrated-test-motan/src/main/java/org/apache/shenyu/integrated/test/motan/MotanIntegratedBootstrap.java Remove Motan integrated-test bootstrap app.
shenyu-integrated-test/shenyu-integrated-test-motan/script/services.list Remove Motan integrated-test healthcheck services list.
shenyu-integrated-test/shenyu-integrated-test-motan/script/healthcheck.sh Remove Motan integrated-test healthcheck script.
shenyu-integrated-test/shenyu-integrated-test-motan/pom.xml Remove Motan integrated-test module POM.
shenyu-integrated-test/shenyu-integrated-test-motan/docker-compose.yml Remove Motan integrated-test docker-compose setup.
shenyu-integrated-test/shenyu-integrated-test-motan/Dockerfile Remove Motan integrated-test Dockerfile.
shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-motan/src/test/java/org/apache/shenyu/integrated/test/k8s/ingress/motan/MotanPluginTest.java Remove k8s ingress Motan test.
shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-motan/src/main/java/org/apache/shenyu/integrated/test/k8s/ingress/motan/MotanIngressControllerIntegratedBootstrap.java Remove k8s ingress Motan bootstrap app.
shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-motan/script/services.list Remove k8s ingress Motan services list.
shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-motan/script/healthcheck.sh Remove k8s ingress Motan healthcheck script.
shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-motan/script/build_k8s_cluster.sh Remove k8s ingress Motan cluster build script.
shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-motan/pom.xml Remove k8s ingress Motan module POM.
shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-motan/deploy/kind-config.yaml Remove k8s ingress Motan kind config.
shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-motan/deploy/deploy-shenyu.yaml Remove k8s ingress Motan deployment manifest.
shenyu-integrated-test/shenyu-integrated-test-k8s-ingress-motan/Dockerfile Remove k8s ingress Motan Dockerfile.
shenyu-integrated-test/shenyu-integrated-test-common/src/main/java/org/apache/shenyu/integratedtest/common/dto/MotanDTO.java Remove Motan DTO used by tests.
shenyu-integrated-test/shenyu-integrated-test-combination/src/test/java/org/apache/shenyu/integrated/test/combination/SharedThreadPoolTest.java Remove Motan from combination shared-thread-pool tests.
shenyu-integrated-test/shenyu-integrated-test-combination/src/main/java/org/apache/shenyu/integrated/test/combination/controller/SharedThreadPoolController.java Remove Motan thread-pool endpoint.
shenyu-integrated-test/shenyu-integrated-test-combination/pom.xml Remove Motan dependencies from combination tests.
shenyu-integrated-test/shenyu-integrated-test-combination/docker-compose.yml Remove Motan example service from combination compose.
shenyu-integrated-test/pom.xml Drop Motan integrated-test modules from build.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/src/main/resources/application.yml Remove Motan example app configuration.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/src/main/java/org/apache/shenyu/examples/motan/service/impl/MotanDemoServiceImpl.java Remove Motan demo service implementation.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/src/main/java/org/apache/shenyu/examples/motan/service/impl/MotanClassDemoServiceImpl.java Remove Motan class demo service implementation.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/src/main/java/org/apache/shenyu/examples/motan/service/TestMotanApplication.java Remove Motan example application entrypoint.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/src/main/http/motan-test-api.http Remove Motan example HTTP client snippet.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/src/main/http/motan-class-test-api.http Remove Motan class demo HTTP snippet.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/pom.xml Remove Motan example service module POM.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/k8s/shenyu-zookeeper.yml Remove Motan example ZK k8s manifest.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/k8s/shenyu-examples-motan.yml Remove Motan example k8s manifest.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/k8s/ingress.yml Remove Motan example ingress manifest.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-service/Dockerfile Remove Motan example Dockerfile.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-api/src/main/java/org/apache/shenyu/examples/motan/service/MotanTest.java Remove Motan example POJO.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-api/src/main/java/org/apache/shenyu/examples/motan/service/MotanDemoService.java Remove Motan demo interface.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-api/src/main/java/org/apache/shenyu/examples/motan/service/MotanClassDemoService.java Remove Motan class demo interface.
shenyu-examples/shenyu-examples-motan/shenyu-examples-motan-api/pom.xml Remove Motan example API module POM.
shenyu-examples/shenyu-examples-motan/pom.xml Remove Motan examples aggregator module.
shenyu-examples/pom.xml Drop Motan examples module from build.
shenyu-e2e/shenyu-e2e-common/src/main/java/org/apache/shenyu/e2e/model/Plugin.java Remove Motan from e2e plugin list enum.
shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-motan/src/test/java/org/apache/shenyu/e2e/testcase/motan/MotanPluginTest.java Remove Motan e2e case (commented-out file deleted).
shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-motan/pom.xml Remove Motan e2e module POM.
shenyu-e2e/shenyu-e2e-case/pom.xml Drop Motan e2e module from build.
shenyu-dist/shenyu-bootstrap-dist/src/main/release-docs/README.txt Remove Motan from distro README supported protocols list.
shenyu-dist/shenyu-bootstrap-dist/src/main/release-docs/LICENSE Remove Motan artifacts from distro license inventory.
shenyu-dist/shenyu-admin-dist/src/main/release-docs/README.txt Remove Motan from admin distro README supported protocols list.
shenyu-common/src/test/java/org/apache/shenyu/common/enums/RpcTypeEnumTest.java Remove Motan assertions from RpcTypeEnum tests.
shenyu-common/src/test/java/org/apache/shenyu/common/dto/convert/plugin/MotanRegisterConfigTest.java Remove Motan register config test.
shenyu-common/src/main/java/org/apache/shenyu/common/utils/PluginNameAdapter.java Remove Motan rpcType→pluginName adapter mapping.
shenyu-common/src/main/java/org/apache/shenyu/common/enums/RpcTypeEnum.java Remove Motan RPC type enum entry and supported-metadata list inclusion.
shenyu-common/src/main/java/org/apache/shenyu/common/enums/PluginEnum.java Remove Motan plugin enum entry.
shenyu-common/src/main/java/org/apache/shenyu/common/dto/convert/selector/MotanUpstream.java Remove Motan upstream selector DTO.
shenyu-common/src/main/java/org/apache/shenyu/common/dto/convert/plugin/MotanRegisterConfig.java Remove Motan plugin register config DTO.
shenyu-common/src/main/java/org/apache/shenyu/common/constant/Constants.java Remove Motan RPC result constants.
shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/common/dto/MotanRpcExt.java Remove Motan client rpcExt DTO.
shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/common/annotation/ShenyuMotanService.java Remove Motan service annotation.
shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/common/annotation/ShenyuMotanClient.java Remove Motan client annotation.
shenyu-client/shenyu-client-motan/pom.xml Remove Motan client module POM.
shenyu-client/pom.xml Drop Motan client module from build.
shenyu-bootstrap/pom.xml Remove Motan plugin dependencies from bootstrap distribution.
shenyu-admin/src/test/java/org/apache/shenyu/admin/service/register/ShenyuClientRegisterMotanServiceImplTest.java Remove Motan client-register service test.
shenyu-admin/src/main/resources/sql-script/h2/schema.sql Remove Motan from H2 seed metadata (api rpc_type comment, plugin rows, handles, namespace rel).
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/register/ShenyuClientRegisterMotanServiceImpl.java Remove Motan client-register implementation.
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/vo/ApiVO.java Remove Motan from ApiVO rpcType documentation.
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/entity/ApiDO.java Remove Motan from ApiDO rpcType documentation.
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/dto/ApiDTO.java Remove Motan from ApiDTO rpcType documentation.
pom.xml Remove Motan dependency management and version property from root build.
db/upgrade/2.7.0-upgrade-2.7.1-pg.sql Add upgrade cleanup to delete Motan plugin/config data (Postgres).
db/upgrade/2.7.0-upgrade-2.7.1-oracle.sql Add upgrade cleanup to delete Motan plugin/config data (Oracle).
db/upgrade/2.7.0-upgrade-2.7.1-og.sql Add upgrade cleanup to delete Motan plugin/config data (openGauss/OG).
db/upgrade/2.7.0-upgrade-2.7.1-ob.sql Add upgrade cleanup to delete Motan plugin/config data (OceanBase).
db/upgrade/2.7.0-upgrade-2.7.1-mysql.sql Add upgrade cleanup to delete Motan plugin/config data (MySQL).
db/init/oracle/schema.sql Remove Motan seed data and update rpc_type comment in Oracle init schema.
README.md Remove Motan from top-level features list.
.github/workflows/integrated-test.yml Remove Motan integrated-test job entry.
.github/workflows/integrated-test-k8s-ingress.yml Remove Motan k8s ingress integrated-test job entry.
.asf.yaml Remove Motan-related GitHub label.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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