[ISSUE #15160] Fix config change pointcut routing for missing srcType#15161
Conversation
|
Thanks for your this PR. 🙏 感谢您提交的PR。 🙏 |
296a426 to
bafb1a4
Compare
bafb1a4 to
e69b3b0
Compare
ba8afd7 to
534c0e8
Compare
|
Error: config] [ERROR] Failures: 这个单测没有过,好像是你修改的部分,麻烦再看一下 |
534c0e8 to
56831d1
Compare
看到了,是昨天别人新增的一个测试用例,合并代码的适合漏处理了,已修改 |
…srcType Route missing config change source types to unknown pointcuts instead of treating them as RPC, and use remove pointcuts for delete operations. Assisted-by: Codex
56831d1 to
61c0ff8
Compare
|
RequestContextHolder 没有清理协议,导致多个测试用例之间的环境污染,影响测试结果。重新在单测开始和结束中添加了RequestContextHolder 的清理操作 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Route missing config change source types to unknown pointcuts instead of treating them as RPC, and use remove pointcuts for delete operations.
Assisted-by: Codex
Please do not create a Pull Request without creating an issue first.
What is the purpose of the change
This PR fixes config-change pointcut routing when
ConfigRequestInfo.srcTypeis missing, empty, or not recognized.本 PR 修复
ConfigRequestInfo.srcType缺失、为空或无法识别时的配置变更切点路由问题。Before this change, a config change without an explicit
srcTypecould be treated as an RPC change.在本次修改前,没有显式
srcType的配置变更可能会被当作 RPC 变更处理。This can affect config-change plugins that intentionally skip RPC events.
这会影响那些有意跳过 RPC 事件的配置变更插件。
For example, when a config publish operation is triggered from the console but is classified as RPC, a file-format config-change plugin may skip validation and allow invalid config content to pass.
例如,当配置发布操作从控制台触发但被识别为 RPC 时,文件格式校验插件可能会跳过校验,导致错误配置内容被放行。
This PR also fixes delete operation routing so that delete operations use remove pointcuts instead of publish pointcuts.
本 PR 同时修正删除操作的切点路由,使删除操作使用 remove pointcut,而不是 publish pointcut。
AI-related config operation call paths are not assigned a new explicit source type in this PR.
本 PR 没有为 AI 相关配置操作调用路径新增显式来源类型。
The
srcTypeof AI entry points is not changed in this PR.本 PR 未调整 AI 入口的
srcType。Some AI paths currently construct an empty
ConfigRequestInfo, and their caller context does not always identify a single HTTP or RPC source at that layer.当前部分 AI 路径会构造空的
ConfigRequestInfo,并且在这些调用层级上并不总能确定单一的 HTTP 或 RPC 来源。These paths remain unclassified instead of being treated as RPC.
这些路径保持未分类状态,而不是被当作 RPC 处理。
Brief changelog
Add unknown config-change pointcut types for unclassified publish and delete operations.
为未分类的发布和删除操作增加 unknown 配置变更切点类型。
Route missing, empty, or unrecognized
srcTypevalues to unknown pointcuts instead of RPC pointcuts.将缺失、为空或无法识别的
srcType路由到 unknown pointcut,而不是 RPC pointcut。Route delete operations to remove pointcuts.
将删除操作路由到 remove pointcut。
Set HTTP
srcTypein HTTP config publish entry points.在 HTTP 配置发布入口设置 HTTP
srcType。Add unit tests for RPC, HTTP remove, and unknown source routing behavior.
为 RPC、HTTP 删除以及 unknown 来源路由行为增加单元测试。
Verifying this change
The following checks were run locally:
本地已执行以下检查:
The full test suite was not completed locally because some tests in this repository are written for Unix-like environments and cannot pass in my local Windows environment.
本地没有完整执行全部 test suite,因为仓库中部分测试按类 Unix 环境编写,在我的 Windows 本地环境中无法通过。
Follow this checklist to help us incorporate your contribution quickly and easily:
[ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check spotbugs:check -DskipTeststo make sure basic checks pass. Runmvn clean installto make sure unit-test pass. Runmvn clean test-compile failsafe:integration-testto make sure integration-test pass.