912 Commits

Author SHA1 Message Date
杨翊 SionYang 86c284aa81 [ISSUE #14817] Disable deprecated AI APIs by default (#15734)
* Disable deprecated AI APIs by default

Assisted-by: Claude Code

* Preserve pipeline detail not-found errors

Assisted-by: Claude Code
2026-08-18 20:15:06 +08:00
杨翊 SionYang c19f283dca fix(core): align legacy context path URI parsing (#15714)
Parse legacy resolver request paths and context paths consistently so encoded context paths can be stripped during controller method lookup.

Assisted-by: Claude Code
2026-08-14 15:07:11 +08:00
杨翊 SionYang cb944211ef feat: add authentication for JRaft gRPC requests (#15687)
Assisted-by: Claude Code
2026-08-10 19:15:15 +08:00
杨翊 SionYang b7a122e481 Refactor controller method resolution with Spring MVC (#15686)
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
2026-08-10 18:32:25 +08:00
杨翊 SionYang 6074e9bc02 Move visibility plugin runtime to core (#15678)
Assisted-by: Codex
2026-08-10 12:12:33 +08:00
杨翊 SionYang e9b1b81edb Harden distributed database query result resolution (#15661)
Validate SelectRequest result targets and eagerly register distributed row mappers.

Assisted-by: Claude Code
2026-08-06 16:14:29 +08:00
杨翊 SionYang 2a8809fd44 [ISSUE #15634] Align API authorization metadata and resource parsing (#15635)
* Fix reviewed HTTP authorization metadata

Assisted-by: Claude Code

* Protect Prometheus service discovery subpaths

Assisted-by: Claude Code

* Secure plugin availability cluster requests

Assisted-by: Claude Code

* Honor explicit authorization resource parsers

Assisted-by: Claude Code

* Fix AgentSpec authorization resource parsing

Assisted-by: Claude Code
2026-08-03 11:09:19 +08:00
杨翊 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 27b3d48668 [ISSUE #15475] Decouple plugin config storage and synchronization (#15611)
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
2026-07-30 11:10:26 +08:00
sai 07a0ff15f8 [ISSUE #15541] Add Agentic Resource Discovery support (#15542)
* Add ARD search API contract

* Implement local ARD search service

* Add ARD search service tests

* Implement ARD P0 persistent indexing

* Add ARD PostgreSQL schema and cursor pagination

* Add ARD skill content and LLM index enhancement

* Rebuild latest ARD index on skill version changes

* Support dedicated ARD pgvector storage

# Conflicts:
#	plugin-default-impl/nacos-default-datasource-plugin/nacos-datasource-plugin-mysql/src/main/resources/META-INF/mysql-schema.sql

* Improve ARD search ranking

* Limit ARD pgvector search in SQL

* Make ARD pgvector embeddings extensible

* Enhance ARD source content for prompt and MCP

* Align ARD search protocol response

* Expose ARD resource artifact URLs

* Support ARD field path filters

* Add ARD agents endpoint

* Add ARD explore endpoint

* Add internal ARD catalog endpoint

* Add ARD catalog list explore DTOs

* Complete local ARD protocol endpoints

* Cover ARD catalog list explore artifacts

* Extract ARD index enhancement prompt

* Make ARD catalog host metadata configurable

* Add ARD vector index SPI

* Add default PostgreSQL ARD vector plugin

* Route ARD vector indexing through plugins

# Conflicts:
#	api/src/main/java/com/alibaba/nacos/api/plugin/PluginType.java

* Extract ARD index enhancement prompt

* refactor: flatten ARD enhancement search phrases

* refactor: split ARD enhancement search chunks

* feat: return complete skill packages from ARD

* test: cover ARD skill package URLs

* Add ARD well-known catalog endpoint

* Simplify ARD catalog base URL configuration

* Tighten ARD catalog base URL semantics

* Align ARD well-known catalog semantics

* Fix ARD namespace authorization parsing

* Clean up ARD index content storage

* Add ARD index backfill

* Add ARD global feature switch

* Move ARD protocol contracts to registry adaptor

* Align ARD vector plugin with unified loading

* Document ARD protocol adaptor ownership

* Decouple ARD protocol and storage concerns

* Fix AI vector plugin discovery

* Fix ARD endpoint authentication

* Fix PostgreSQL ARD vector schema isolation

* Fix ARD protocol compatibility and artifact routing

Pin the upstream ARD contract, align response and error models, and serve complete Skill artifacts from the adaptor web context.

* Move ARD discovery logic into AI module

* Make ARD index maintenance durable

Persist coalesced resource-level index tasks with leased retry, make relational and default PostgreSQL vector replacement transactional, and reconcile stale or orphaned indexes periodically.

* Fix ARD schema fixture RAT exclusion

Use a module-independent path pattern so the pinned upstream JSON Schema is excluded when RAT runs from either the repository root or the adaptor module.

* Refine ARD search architecture and compatibility

* Fix ARD release blockers

Align ARD authentication, catalog URLs and identifiers with the pinned protocol contract. Bound discovery/index queries, complete namespace catalogs, and document the three-table migration path.

* Fix ARD authentication in adaptor context

* Fix PluginType spotless formatting
2026-07-29 09:49:47 +08:00
杨翊 SionYang 1ecc39c45c [ISSUE #15475] Align plugin provider and configuration contracts (#15593)
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
2026-07-28 17:47:39 +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 709bd78ab6 [ISSUE #15475] Integrate environment plugin pre-context configuration (#15590)
* [ISSUE #15475] Integrate environment plugin pre-context configuration

Unify environment plugin discovery, static configuration apply, and startup handoff through PRE_CONTEXT initialization.

Assisted-by: Claude Code

* Fix environment plugin initialization test

Assisted-by: Claude Code
2026-07-27 19:49:53 +08:00
杨翊 SionYang 27d24e55e4 Integrate control plugin with unified configuration (#15572)
Assisted-by: Claude Code
2026-07-24 15:54:07 +08:00
杨翊 SionYang 279f1ba1ea Add unified plugin configuration console (#15568)
Assisted-by: Claude Code
2026-07-23 19:03:45 +08:00
杨翊 SionYang 8cd1910c32 Refine plugin loading and state lifecycle (#15564)
Assisted-by: Claude Code
2026-07-23 11:11:24 +08:00
yijie zhao b46aae5484 [ISSUE #15510] Reject invalid credential before anonymous fallback (#15526)
* fix: reject invalid credential before anonymous fallback

* fix: harden anonymous auth fallback

* style: format identity context api

* style: format auth filter test

* style: apply spotless formatting
2026-07-22 19:31:05 +08:00
杨翊 SionYang d0c1183055 Fix plugin state snapshot restore before discovery (#15559)
Assisted-by: Claude Code
2026-07-22 17:57:01 +08:00
杨翊 SionYang 91b64da883 Encapsulate persisted plugin config source (#15556)
Assisted-by: Claude Code
2026-07-22 15:00:48 +08:00
杨翊 SionYang a66d928bc6 Unify plugin configuration SPI contracts (#15555)
Assisted-by: Claude Code
2026-07-22 13:38:59 +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 0797f4ecc3 [ISSUE #15475] Align trace and visibility plugin lifecycle (#15538)
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
2026-07-20 19:51:39 +08:00
杨翊 SionYang 30c1398ab9 [ISSUE #15475] Standardize plugin state and AI pipeline lifecycle (#15537)
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
2026-07-20 17:51:59 +08:00
杨翊 SionYang 41b6c5ad58 [ISSUE #15475] Integrate visibility and AI storage plugin management (#15523)
* [ISSUE #15475] Integrate visibility plugin state

Assisted-by: Claude Code

* [ISSUE #15475] Clarify AI storage plugin state

Assisted-by: Claude Code
2026-07-16 18:54:03 +08:00
杨翊 SionYang 7b761f374b [ISSUE #15475] Bridge config change plugin configuration (#15522)
Assisted-by: Claude Code
2026-07-16 15:24:16 +08:00
杨翊 SionYang 73c89c37f6 [ISSUE #15475] Integrate Nacos auth plugin configuration (#15511)
Assisted-by: Claude Code
2026-07-15 13:33:27 +08:00
杨翊 SionYang b9333258be [ISSUE #15475] Complete plugin management foundation (#15500)
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
2026-07-13 17:33:58 +08:00
杨翊 SionYang 007fe68cb2 Fix config namespace isolation for ID-based operations (#15498)
* 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
2026-07-13 15:31:00 +08:00
杨翊 SionYang d1a0a2b745 [ISSUE #15475] Improve plugin config unit test coverage (#15499)
* [ISSUE #15475] Improve plugin config unit test coverage

Assisted-by: Claude Code

* Stabilize naming tests on ephemeral runners

Assisted-by: Claude Code
2026-07-13 13:54:07 +08:00
杨翊 SionYang 35c518f950 [ISSUE #15475] Add runtime plugin config update flow (#15496)
* [ISSUE #15475] Add runtime plugin config update flow

Assisted-by: Claude Code

* Fix plugin config OpenAPI IT request encoding

Assisted-by: Claude Code
2026-07-13 11:17:09 +08:00
杨翊 SionYang e79d2e4dc6 [ISSUE #15475] Add effective plugin config detail resolution (#15485)
* [ISSUE #15475] Add effective plugin config detail resolution

Assisted-by: Claude Code

* [ISSUE #15475] Add effective plugin config detail resolution

Assisted-by: Claude Code

* [ISSUE #15475] Simplify plugin config resolution

Assisted-by: Claude Code

* [ISSUE #15475] Refine plugin config aliases and MCP IT

Assisted-by: Claude Code
2026-07-10 14:31:52 +08:00
杨翊 SionYang b1cd18225b [ISSUE #15475] Add plugin config metadata model (#15479)
Assisted-by: Claude Code
2026-07-09 13:56:14 +08:00
Vasiliy Mikhailov 77827af238 Fix off-by-one page count in PageUtil for divisible totals (#15446)
* Fix off-by-one page count in PageUtil for divisible totals

* Apply spotless formatting to PageUtilTest

Signed-off-by: vmihaylov <vasiliy.mikhailov@gmail.com>

* Align CatalogServiceV2ImplTest page count with the PageUtil ceiling-division fix

Signed-off-by: Vasiliy Mikhailov <vasiliy.mikhailov@gmail.com>

---------

Signed-off-by: vmihaylov <vasiliy.mikhailov@gmail.com>
Signed-off-by: Vasiliy Mikhailov <vasiliy.mikhailov@gmail.com>
2026-07-03 15:10:45 +08:00
hutiefang76 c42ec16614 [ISSUE #12867] Add raft group metrics (#15408)
* [ISSUE #12867] Add raft group metrics

* fix: preserve raft leader metrics on member events
2026-06-30 11:54:22 +08:00
杨翊 SionYang 162e53c6d7 Remove confirmed unused Java code follow-ups (#15432)
* Remove unused api AgentSpec group helper

* Remove unused common test field

* Remove unused ai pipeline SQL helper

* Remove unused copilot helpers

* Remove unused istio listener helper

* Remove unused lock wait queue helpers

* Remove unused core utilities

* Remove unused config code

* Remove unused naming code

* Fix ai prompt migration test isolation

Assisted-by: Codex

* Fix client test isolation

Assisted-by: Codex
2026-06-25 19:58:12 +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
徐晓伟 4bec8b06c5 chore(deps): spring-boot upgrade from 3.5.14 to 4.0.6 (#14945)
* 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>
2026-06-10 10:08:48 +08:00
Guimu fd5114fdae [ISSUE #15032] Fix TCP health-check channel leak and member IP prefix match (#15309)
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>
2026-06-05 14:01:00 +08:00
杨翊 SionYang 9136e9864f Add @Since annotations for public APIs (#15266)
* 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
2026-05-28 15:40:04 +08:00
Guimu 6cf8253662 Replace printStackTrace() with proper logging in 3 silent-failure paths (#15194)
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.
2026-05-20 18:13:01 +08:00
wanshuo e88b83ae31 [ISSUE #15166] fix(core/ai): resolve controller mapping with request context path (#15167) 2026-05-20 10:49:55 +08:00
cxhello 49f645b28a [ISSUE #14815] build(style): align Checkstyle with Spotless and enable spotless:check in CI (#15117)
- 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>
2026-05-11 10:22:17 +08:00
cxhello c57def9078 [ISSUE #14815] build(style): apply Spotless formatting to core module (#15096)
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>
2026-05-09 15:00:01 +08:00
杨翊 SionYang 5dd475b15e Merge pull request #15030 from xuxiaowei-com-cn/xuxiaowei/function_mode
feat: add microservice/ai function mode, support disabling AI registry in console, and add Makefile for rapid development
2026-05-08 19:07:25 +08:00
MurphyYi a95d447095 fix(deps): bump micrometer.version from 1.12.8 to 1.15.10 (#15060)
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
2026-05-08 09:59:58 +08:00
徐晓伟 68d0aa5c36 Merge remote-tracking branch 'alibaba/develop' into xuxiaowei/function_mode
# Conflicts:
#	console/src/main/resources/static/legacy/index.html
#	console/src/main/resources/static/legacy/js/main.js
#	console/src/main/resources/static/next/js/main.js
2026-05-07 20:16:12 +08:00
Guimu ab8b49c54b fix(auth): make NacosServerAuthConfig plugin map volatile and read once (#15002)
`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.
2026-05-07 19:23:53 +08:00
徐晓伟 4baa7eb6e5 feat: add AI function mode support across all modules 2026-05-07 17:35:38 +08:00
徐晓伟 2bcdf7bd38 refactor(core): rename function mode from simple to microservice
- 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
2026-05-07 15:10:55 +08:00
徐晓伟 bb3f3df225 feat(core): add simple function mode and Makefile for development
- 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.
2026-05-06 02:33:19 +08:00