Parse legacy resolver request paths and context paths consistently so encoded context paths can be stripped during controller method lookup.
Assisted-by: Claude Code
Reuse the active RequestMappingHandlerMapping for authorization method lookup, retain a deprecated legacy fallback, and add auth-enabled integration coverage for module permissions and ambiguous URI forms.
Assisted-by: Claude Code
Add extensible runtime plugin config storage and cluster state synchronizer providers. Keep standalone updates local, default cluster synchronization to Raft, and isolate storage or synchronizer failures from Nacos startup.
Assisted-by: Claude Code
Honor provider order before first-wins registration, align built-in plugin routers with the same conflict policy, and remove datasource fallback to an unrelated dialect.
Make standard configuration keys authoritative by presence and enable AI resource import unless explicitly disabled. Update bilingual plugin specs and tests accordingly.
Assisted-by: Claude Code
* Remove reflective EnvUtil access from visibility plugin
Assisted-by: Claude Code
* Use first-wins plugin registration and definition normalization
Assisted-by: Claude Code
Apply trace plugin state when dispatching events and retain disabled subscribers for runtime re-enablement. Prevent configurable visibility plugins from receiving the deprecated legacy initialization callback, while preserving compatibility for older implementations.
Assisted-by: Claude Code
Centralize plugin execution capabilities and separate core module gates from plugin state. Migrate AI pipeline services to direct PluginConfigSpec lifecycle management with unified runtime ordering and legacy configuration compatibility.
Assisted-by: Claude Code
Complete unified plugin state enforcement for runtime-routed plugin families.
Add static configuration refresh snapshots, source resolver registry, restart-only field isolation, and shared plugin type capabilities before production plugins adopt PluginConfigSpec.
Assisted-by: Claude Code
* Fix config namespace isolation for delete and export
Scope config export-by-ids and batch delete-by-ids to the requested namespace across admin, console, and maintainer SDK paths.
Update specs and IT scenario coverage for namespace-scoped storage ID operations.
Assisted-by: Claude Code
* Document config storage ID selector deprecation
Assisted-by: Claude Code
* Fix config clone namespace isolation
Ensure config clone resolves source IDs within the requested source namespace before writing to the target namespace. Update console and maintainer SDK paths plus API/SDK test specs.
Assisted-by: Claude Code
* Refine config clone service coverage
Extract shared clone logic into ConfigCloneService and move clone behavior coverage from controller tests into service-level tests.
Assisted-by: Claude Code
* Refine config clone source authorization
Add source namespace READ authorization for config clone paths and keep auth identity/resource context available for diagnostics.
Assisted-by: Claude Code
* Refresh legacy console clone namespace assets
Assisted-by: Claude Code
* Fix datasource export namespace isolation tests
* Cover datasource export namespace isolation tests
* Fix auth admin filter test header stubbing
* Stabilize clone source auth checker tests
* Apply spotless to clone auth checker
* [ISSUE #15475] Improve plugin config unit test coverage
Assisted-by: Claude Code
* Stabilize naming tests on ephemeral runners
Assisted-by: Claude Code
* chore(deps): spring-boot upgrade from 3.4.10 to 4.0.5
* chore(deps): micrometer upgrade from 1.12.8 to 1.13.0
* chore(deps): replace javax.annotation with jakarta.annotation
* chore(deps): spring-boot upgrade from 3.4.10 to 4.0.5
* chore(deps): spring-boot upgrade from 3.4.10 to 4.0.5: fix controller response
* chore(deps): spring-boot upgrade from 4.0.5 to 4.0.6
* chore(deps): spring-boot upgrade from 3.5.13 to 4.0.6: Restore blank line indentation whitespace to match develop
Blank lines adjacent to @Mock → @MockitoBean changes lost their
indentation spaces (e.g., 4 spaces became empty). Restore the
original whitespace to minimize unrelated diff noise.
* chore(deps): spring-boot upgrade from 3.5.13 to 4.0.6: Remove duplicate micrometer version override in pom.xml
The old 1.13.0 override was superseded by 1.15.10 (for Spring Boot
upgrade compatibility, see #15033). Having two definitions is
confusing; only the latter takes effect in Maven.
* chore(deps): spring-boot upgrade from 3.5.13 to 4.0.6: Restore blank line indentation whitespace to match develop
* style: apply spotless formatting fixes
Assisted-by: Claude Code
* Merge branch 'develop' into xuxiaowei/spring-boot-4
# Conflicts:
# .github/workflows/it-new.yml
# config/src/test/java/com/alibaba/nacos/config/server/controller/v3/ConfigOpsControllerV3Test.java
# config/src/test/java/com/alibaba/nacos/config/server/exception/GlobalExceptionHandlerTest.java
# config/src/test/java/com/alibaba/nacos/config/server/service/capacity/CapacityServiceTest.java
* style: apply spotless formatting
* chore(build): bump MCP SDK from 0.17.0 to 0.18.2
Assisted-by: Claude Code
* Remove spring-boot-starter-ldap-test dependency from console module
* Apply spotless formatting to ConfigOpenApiITCase
* Update TomcatConnectorCustomizer import for Spring Boot 4 compatibility
Assisted-by: Claude Code
* Replace ObjectNode with Map<String, Object> in ClientService API for Spring Boot 4 compatibility
* Remove redundant dependencies from test aggregator POM for Spring Boot 4 compatibility
* Makefile: Enhance Makefile for local dev workflow: add auth-disabled args, release-nacos profile, and IT test targets
* Makefile: Extract auth-disabled JVM args into standalone AUTH_DISABLED_ARGS variable
* Makefile: Add missing IT test targets to .PHONY declaration
Assisted-by: Claude Code
* build(deps): Refactor LDAP dependency: move spring-boot-starter-ldap to nacos-ldap-auth-plugin only
* build(deps): Add nacos-ldap-auth-plugin dependency to nacos-server module
* build(deps): Add nacos-ldap-auth-plugin dependency to nacos-console module
* build(deps): Remove nacos-ldap-auth-plugin dependency and LdapAutoConfiguration exclusion
* build(deps): Remove nacos-ldap-auth-plugin dependency and LdapAutoConfiguration exclusion
* Remove ConfigInfoBetaPersistService references and fix formatting in tests
Assisted-by: Claude Code
* Migrate javax.annotation to jakarta.annotation for Spring Boot 4 compatibility
Replace javax.annotation.{PostConstruct,PreDestroy,Resource} imports and
native-image reflect-config entries with jakarta.annotation equivalents.
* Add issue link for Makefile usage guide (#15338)
* Add test, check-maven, build-maven-test targets to Makefile (#15338)
---------
Co-authored-by: 杨翊 SionYang <xiweng.yy@alibaba-inc.com>
Two cluster bugs tracked by #15032 (supersedes the abandoned #14951 and
addresses the review feedback there):
1. ServerMemberManager.hasMember(String): the IP-only fallback used a substring
match (StringUtils.contains), so "192.168.1.10" wrongly matched a member
"192.168.1.100:8848", causing false-positive membership and split-brain
alerts. Compare the member IP exactly (member.getIp().equals(address)),
which is also IPv6-safe (no ":" splitting).
2. TcpHealthCheckProcessor (v2) PostProcessor: the successful connect path did
not close the channel, and the ConnectException (connection-refused) path
did not either. On failure finishCheck() removes the beat from keyMap, so the
next round can no longer close the orphaned channel, leaking a file
descriptor on every connection-refused check. Cancel the key and close the
channel on both paths.
Add focused regression tests: hasMember prefix/substring collisions in
ServerMemberManagerTest, and channel-closed-on-success / connection-refused in
a new TcpHealthCheckProcessorTest (real loopback sockets + real Selector).
Assisted-by: Claude Code
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(build): bump project revision from 3.2.1 to 3.2.2.
* Add since annotation requirements to API specs
* Add API since annotation
* Add since annotations to SDK service APIs
* Add since annotations to core APIs
* Add since annotations to config and naming APIs
* Add since annotations to AI and lock APIs
* Add since annotations to console and plugin APIs
* Add since annotations to address APIs
Three production code paths swallow exceptions by calling
`Throwable.printStackTrace()`. That bypasses the configured logging
framework — the stack trace goes to stderr instead of the Nacos log
files, so it does not participate in log rotation / aggregation and is
easy to miss in clustered deployments.
This is a follow-up to #15179, which fixed the same anti-pattern in
`IoUtils#tryCompress` and `NamingFuzzyWatchContextService#trimFuzzyWatchContext`.
Each site here meaningfully impairs observability for real failures:
- `client/.../ClientWorker.java`
Inside `ClientWorker$ConfigRpcTransportClient#shutdown`, the catch
for `RpcClient#shutdown` errors only printed the stack to stderr;
the surrounding routine already uses `LOGGER.info` for the happy
path of the same loop, so a failed shutdown is the only path that
silently disappears. Switched to `LOGGER.warn` and included the
offending rpc client name in the message so operators can correlate
with the matching `Trying to shutdown rpc client ...` line.
- `common/utils/VersionUtils.java`
The static initializer reads `nacos-version.txt`. If the resource is
missing or unparseable, `version` and `clientVersion` silently remain
unset. Added a class-level slf4j Logger and routed the failure
through `LOGGER.warn`, including the file name and a hint that the
version fields will remain unset.
- `core/.../OptionalTlsProtocolNegotiator.java`
`getDefPne()` uses reflection on `ProtocolNegotiationEvent.DEFAULT`
and falls back to `null` on failure. The caller stores that null in
`PortUnificationServerHandler#pne` and later fires it as a user
event, which can break gRPC TLS negotiation. Logging via slf4j makes
the reflection failure visible at startup; behavior on the happy
path is unchanged.
`AbilityKey#static {}` in the `api/` module uses the same pattern, but
that module has no slf4j dependency today. Touching it would change the
SDK's transitive dependency surface, so it is deliberately left out of
this PR — that change should be discussed separately.
The catch blocks are intentionally preserved in all three sites: the
failure modes are recoverable for their callers (continue shutting
down remaining clients / fall back to unset version / return null for
the reflection failure), and the original behavior should not change.
## Brief changelog
- `client/.../ClientWorker.java` — use existing `LOGGER` to log
`RpcClient#shutdown` failures with the client name
- `common/utils/VersionUtils.java` — add slf4j logger, log
`nacos-version.txt` load failures
- `core/.../OptionalTlsProtocolNegotiator.java` — add slf4j logger,
log `ProtocolNegotiationEvent.DEFAULT` reflection failures
## Verifying this change
- `rg -n 'printStackTrace\(\)' client/src/main/java common/src/main/java core/src/main/java` reports no remaining hits in these three files
- `mvn -pl client,common,core -B checkstyle:check apache-rat:check spotless:check -DskipTests` — passes
- `mvn -pl client,common,core -am -B clean compile spotbugs:check -DskipTests` — passes
- Behavior unchanged on the happy paths; only the failure-mode output channel changes (stderr → slf4j)
Follow this checklist to help us incorporate your contribution quickly and easily:
* [ ] Make sure there is a Github issue filed for the change (usually before you start working on it).
* [√] Format the pull request title like `[ISSUE #123] ...`. Each commit in the pull request should have a meaningful subject line and body.
* [√] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
* [√] Write necessary unit-test (over 80%) to verify your logic correction. If you are creating a function or feature that affects unit-test files, please go to the `nacos-test` module to run all unit-tests to verify whether they pass.
* [√] Run `mvn -B clean package apache-rat:check checkstyle:check spotbugs:check -DskipTests` to make sure basic checks pass. Run `mvn clean install -DskipTests` to make sure all checks pass.
- Change lineWrappingIndentation from 0 to 4 to match continuation_indentation=1
- Change arrayInitIndent from 8 to 4 to match continuation_indentation_for_array_initializer=1
- Remove all // @formatter:off/on workarounds (no longer needed)
- Re-format modules affected by continuation_indentation_for_array_initializer change
- Add checkstyle:check and spotless:check to CI check step
Signed-off-by: cxhello <caixiaohuichn@gmail.com>
Apply Eclipse JDT Formatter via Spotless to all Java source files in
the core module (435 files). Add missing Javadoc to 3 methods in
NacosApiExceptionHandler exposed by line wrapping.
Assisted-by: Claude Code
Signed-off-by: cxhello <caixiaohuichn@gmail.com>
The Prometheus actuator endpoint was unavailable in Nacos 3.2.1 even
when management.endpoints.web.exposure.include was set to '*'.
Root cause: micrometer-registry-prometheus 1.12.8 has a compatibility
issue that prevents the PrometheusMeterRegistry from being properly
auto-configured in Spring Boot 3.5.x applications.
Bumping micrometer.version to 1.15.10 resolves the issue without any
code changes.
Fixes#15033
`NacosServerAuthConfig.authPluginProperties` is reassigned by `refreshPluginProperties`
on the dynamic-config refresh path while request-handling threads call
`getAuthPluginProperties` concurrently. Two issues exist on the read path:
1. The field has no volatile modifier, so a reassignment performed on the refresh
thread is not guaranteed to be visible to other threads.
2. `getAuthPluginProperties` reads the field twice (`containsKey` then `get`). If
a refresh swaps in a map missing the requested key between the two reads, the
method returns null and propagates a NullPointerException to callers instead of
falling back to an empty `Properties` as intended.
Mark the field volatile and replace the check-then-act pattern with a single `get`
whose result is null-checked before returning, so the safe fallback path is taken
whenever the key is absent regardless of refresh interleaving. Mirrors the fix
applied to `ConfigChangeConfigs` in #14988.
- Update Makefile targets: simple -> microservice
- Rename FunctionMode.SIMPLE to FunctionMode.MICROSERVICE
- Update ConditionFunctionEnabled to use new mode name
- Adjust startup scripts and configuration references
- Code formatting improvements in filter classes
- Add FUNCTION_MODE_SIMPLE constant to support simple mode
- Update ConditionFunctionEnabled to enable both config and naming in simple mode
- Add unit tests for simple mode functionality
- Add Makefile with build and run targets for different function modes
- Update startup script and UI components to support simple mode
Simple mode enables both config and naming services simultaneously, providing
a convenient option for development and testing scenarios.