36 Commits

Author SHA1 Message Date
杨翊 SionYang 645f9a13ef Deprecate legacy plugin compatibility paths (#15614)
Continuous Integration / ci (push) Has been cancelled
Frontend Continuous Integration / frontend-ci (push) Has been cancelled
Frontend Continuous Integration / check-min-release-age (push) Has been cancelled
Assisted-by: Claude Code
2026-07-30 15:18:06 +08:00
杨翊 SionYang bd33453a99 [ISSUE #15475] Make plugin discovery conflicts deterministic (#15592)
* Remove reflective EnvUtil access from visibility plugin

Assisted-by: Claude Code

* Use first-wins plugin registration and definition normalization

Assisted-by: Claude Code
2026-07-28 12:07:09 +08:00
杨翊 SionYang 27d24e55e4 Integrate control plugin with unified configuration (#15572)
Assisted-by: Claude Code
2026-07-24 15:54:07 +08:00
杨翊 SionYang ffa81ce810 Add plugin type policies and critical validation (#15548)
Assisted-by: Claude Code
2026-07-21 19:14:33 +08:00
杨翊 SionYang 1f9f6ccc8e Remove confirmed unused Java code (#15358)
* Remove confirmed unused Java code

Remove validated unused helpers, constants, classes, and matching dedicated tests across Java modules.

Deprecate currently unused datasource mapper methods so downstream plugin usage can be confirmed before removal.

Validation:

- mvn spotless:check

- mvn -B clean compile apache-rat:check checkstyle:check spotbugs:check spotless:check -DskipTests

- mvn -B '-Prelease-nacos,!dev' clean install -Drat.skip=true -Dspotbugs.skip=true -Dcheckstyle.skip=true -DskipTests=false

- mvn -B clean install -Prelease-nacos -DskipTests=true

- mvn -B clean verify -Pintegration-test

- mvn -B -pl test/java-sdk-test clean verify -Pjava-sdk-integration-test -DskipTests=false

- mvn -B -pl test/maintainer-sdk-test clean verify -Pmaintainer-sdk-integration-test -DskipTests=false

Assisted-by: Codex

* Fix flaky unit test setup

Reuse the same version 0.2.0 tar.gz fixture bytes for digest validation and HTTP response payloads, and initialize EnvUtil in GlobalExecutorTest when the test runs without suite-level environment setup.

Assisted-by: Codex

* Fix config test isolation

Assisted-by: Claude Code

* Fix flaky failover reactor test

Assisted-by: Claude Code
2026-06-16 00:12:23 +08:00
杨翊 SionYang 0b932e8367 Improve plugin module unit test coverage (#15219)
* Improve plugin module unit test coverage

Assisted-by: Claude Code

* Improve plugin SPI coverage

Assisted-by: Claude Code
2026-05-22 13:57:41 +08:00
杨翊 SionYang f7d86cb901 test: improve plugin module unit test coverage (#15209)
* test: improve plugin module coverage

* test: make tps metrics test timezone independent
2026-05-21 20:39:26 +08:00
cxhello f8237f314f [ISSUE #14815] build(style): apply Spotless formatting to plugin module (#15106)
Signed-off-by: cxhello <caixiaohuichn@gmail.com>
2026-05-09 17:04:55 +08:00
Guimu 9e800b32a4 fix(plugin/control): preserve multi-byte UTF-8 chars across DiskUtils chunk boundaries (#15073)
DiskUtils.readFile streams the file in 4096-byte chunks and decodes each
chunk with a CharsetDecoder. After draining the chars from each chunk the
loop calls buffer.clear(). When a multi-byte UTF-8 character straddles
the 4096-byte boundary the decoder reports UNDERFLOW and leaves the
leading bytes of that character in the buffer; clear() then discards
them. The next read starts on an orphaned UTF-8 continuation byte, the
decoder reports malformed input, and the rest of the file is silently
truncated.

Concretely, a file laid out as 4094 ASCII bytes + '中' (3-byte CJK,
E4 B8 AD) + 200 ASCII bytes round-trips back as just 4094 ASCII chars
with the trailing '中' and 200 ASCII bytes lost.

Replace buffer.clear() with buffer.compact() so any unconsumed trailing
bytes survive into the next read, and finalize the stream after EOF
with decoder.decode(buffer, ..., true) + decoder.flush(charBuffer) so
the decoder also drains any state it is holding for the very last
character of the file.

The new testReadFileWithMultiByteUtf8AcrossChunkBoundary builds the
file layout above, asserts the byte indices of '中' against the buffer
boundary, and asserts the exact round-trip. It fails deterministically
on upstream/develop and passes only after the fix.

Builds on the per-call CharsetDecoder change merged in #15065.

Assisted-by: Claude Code
2026-05-08 19:22:33 +08:00
Guimu 840ad82da8 fix(plugin/control): allocate CharsetDecoder per call in DiskUtils.readFile (#15065)
The previous implementation shared a single static CharsetDecoder across
all callers of DiskUtils.readFile. CharsetDecoder is documented as not
safe for concurrent use, and it also retains internal state across decode
invocations. As a result, concurrent calls (for example LocalDiskRuleStorage
loading multiple TPS rule files at once) could corrupt each other's output,
and even sequential calls could observe leftover state from a previous read.

Move the decoder into the readFile method so each call operates on a fresh,
isolated instance. Add tests covering concurrent reads of distinct files,
sequential reads on the same file, and a UTF-8 multi-byte regression.

Assisted-by: Claude Code
2026-05-07 19:09:02 +08:00
chunhai1127 dc9160c4ac fix: replace Long.valueOf(s) with Long.parseLong(s) to avoid redundant unboxing.(#14471) (#14475)
Co-authored-by: zhouchunhai <zhouchunhai@cmss.chinamobile.com>
2026-02-25 10:53:09 +08:00
codez 0b49892744 Refactor: Remove obsolete p3c-pmd plugin and cleanup annotations (#14455) (#14461) 2026-02-11 13:34:53 +08:00
Eric Wang f39ce37f56 [ISSUE #14079] Add plugin management console UI and API (#14117)
* feat(console): console plugin management

* feat(console): add remote handler support for plugin management
2026-01-20 11:02:38 +08:00
JayLiu f2506f1394 bugfix: fix control plugin bug (#14063)
* fix: 修复 TpsControlManager 相关问题

* fix: 更新 NacosTpsControlManager

* fix: 修复 NacosTpsControlManagerTest.testApplyTpsRule1 测试失败

- 修改测试用例,为 TpsControlRule 设置 RuleDetail,使其符合当前实现逻辑
- 当前实现要求 rule.getPointRule() 不为 null 才会添加到 rules 中

* fix
2025-12-29 16:05:14 +08:00
misakacoder 0237ad80f3 [ISSUE #13038] 修复多个线程同时创建ConnectionManager类的Bean的问题 (#13042) 2025-01-15 13:40:41 +08:00
KomachiSion 7ccf2fbf53 Fix Unit test problem. 2025-01-10 14:35:50 +08:00
杨翊 SionYang a0fdc42ce5 Enhance Disk operation for DiskUtils (#12756)
* Add some check in DiskUtil and add unit test.

* simply DiskUtils in control plugin.
2024-10-17 16:08:42 +08:00
Sunrisea 6122a9afc4 Fix the bug of ConnectionControlManager (#12399) 2024-07-24 16:05:34 +08:00
shalk(xiao kun) 21bfac76e7 upgrade module naocs-plugin from junit4 to junit5 (#12229) 2024-06-17 14:08:09 +08:00
温安适 1710fa32a2 [ISSUES #11626] 优化Nacos的默认反脆弱插件 (#11625)
* Update LocalSimpleCountRateCounter.java

fixbug

* Update LocalSimpleCountRateCounter.java

bugfix

* fix:默认的nacos反脆弱插件的问题

* fix:默认的nacos反脆弱插件的问题

* fix:默认的nacos反脆弱插件的问题

* fix:默认的nacos反脆弱插件的问题

* fix:默认的nacos反脆弱插件的问题,调整为tryAdd

* fix:默认的nacos反脆弱插件的问题,调整为tryAdd

* 调整测试方式,保障流水线成功
2024-02-22 11:32:04 +08:00
hth 21f8065073 log improvement (#11753) 2024-02-20 10:42:58 +08:00
Qishang Zhong bd5caa64a6 Clean up system property after running the test case (#11711) 2024-01-31 09:30:01 +08:00
hth 207505735c add UT for control plugin (#11611)
* add ut for control plugin

* control plugin fix LocalDiskRuleStorage mkdirs
2024-01-11 17:11:47 +08:00
hth b4a380f15b control plugin fix LocalDiskRuleStorage mkdirs (#11620) 2024-01-11 17:08:55 +08:00
hth 8a69c9e8ac fix default tps control plugin (#11579) 2024-01-05 17:47:59 +08:00
shuoer86 8ce06316f8 Fix some typos (#11269) 2023-10-30 16:27:53 +08:00
杨翊 SionYang 0e6b5faf4f Add description for new plugin. (#11268) 2023-10-19 17:11:15 +08:00
杨翊 SionYang 57efe9f520 use DefaultNacosTpsBarrierCreator as Tps manager default impl. (#11185) 2023-09-25 17:04:41 +08:00
杨翊 SionYang 51b6a443d3 Refactor control plugin (#11174)
* Refactor control plugin and add default implementation.

* Move auth default plugin into other modules.

* Fix control plugin config not effect problem.

* Fix UT error.
2023-09-22 16:59:25 +08:00
杨翊 SionYang 0c44dce0cc Refactor control plugin (#11169)
* Refactor control plugin.

* For checkstyle.
2023-09-21 13:47:28 +08:00
ZhangShenao 25ef67db9a Reactor code in datasource-plugin (#10791)
* Reactor code in datasource-plugin

* Fix Abstract Mapper Test Case

* Add Empty Check

* Fix Checkstyle

* fix checkstyle

* fix check style

* fix check style

* Fix CheckStyle

* Fix SQL Blank
2023-07-25 09:44:01 +08:00
Darren Luo 069c6f920c [ISSUE #10593]修改 nacos-contrl-plugin 的数据落地位置 (#10638)
* 修改nacos-contrl-plugin插件中落地数据的 defaultBaseDir() 方法,使其不产生特殊的文件夹而落到运行目录的data文件夹下

* remove unused import
2023-06-15 10:29:20 +08:00
varyuan 2dde125a51 clean code (#10180)
* clean code

* clean code

* clean code

* clean code
2023-03-29 14:25:22 +08:00
gongzhongqiang 708387c277 fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
nov.lzf 1322486849 Develop optimize controplugin 20221214 (#9715)
* 限流插件优化

* 反脆弱插件移除nacos-sys依赖

* 移除nacos-sys依赖
2022-12-16 13:18:44 +08:00
nov.lzf acc8ab46cf Refactor connection limit module to plugin (#9653)
* 限流插件提交

* 限流插件提交

* 限流插件提交

* 限流插件重构提交

* connection control test case submit

* tps control test case submit

* tps control test case submit

* tps control test case submit

* exact model has higher priority

* exact model has higher priority

* tpsreporter

* tpsreporter

* tpsreporter

* check style

* log optimize

* interceptor

* checkstyle

* tps check

* configController query http

* rename component

* 优化参数命名

* 优化参数命名

* 优化参数命名

* 优化参数命名

* optimize connection manager

* optimize connection manager

* optimize connection manager

* optimize connection manager

* interceptor to mse

* Monitor Model

* Monitor Model

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* revert opensource tps ability

* opensource submit

* opensource submit

* check style

* check style

* pmd ,rat

* update db params

* test case fix

* 简化开源反脆弱实现

* test case

* test  case fix

* 修复单测

* 修复单测

* 修复单测
2022-12-06 16:15:51 +08:00