1259 Commits

Author SHA1 Message Date
杨翊 SionYang 812f49f67e Secure MCP tool import endpoint access (#15746)
Allow public MCP endpoints by default while blocking private and local targets unless an operator-managed IP or CIDR rule permits them. Add a global switch, explicit UI feedback, specifications, unit tests, and OpenAPI coverage.

Assisted-by: Claude Code
2026-08-21 17:15:00 +08:00
杨翊 SionYang ba35d1fdee fix(console): forward caller identity to remote server (#15742)
Assisted-by: Claude Code
2026-08-20 19:08:07 +08:00
杨翊 SionYang ccfaee8845 [ISSUE #15475] Fix standalone console auth plugin initialization (#15740)
Initialize configurable auth plugins with static and default configuration in independent Console deployments, preserve restart-only selection semantics, and cover the real Console Spring context lifecycle.

Assisted-by: Claude Code
2026-08-20 16:18:56 +08:00
陈浩 Nineteen 6ab0f690ae 补充单测 (#15732) 2026-08-20 11:59:42 +08:00
杨翊 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
sai 01cc133735 [ISSUE #15705] Fix AI storage cleanup consistency (#15706)
* fix: clean up removed Skill draft files

Delete resource files omitted by draft update or upload overwrite before persisting the replacement storage descriptor, so cleanup failures remain retryable.

Assisted-by: Claude Code

* fix(ai): support legacy storage descriptors on deletion

Assisted-by: Claude Code

* fix(ai): clean up removed AgentSpec draft files

Delete resource files omitted by AgentSpec draft updates and upload overwrites before persisting the replacement manifest and descriptor.

Assisted-by: Claude Code

* add console static resources

# Conflicts:
#	console/src/main/resources/static/next/js/client.js
#	console/src/main/resources/static/next/js/newMcpServer.js

* test: align AgentSpec concurrent save reflection signature
2026-08-18 14:48:25 +08:00
杨翊 SionYang 9a0f108f31 [ISSUE #15695] Optimize configuration page layouts (#15729)
Assisted-by: Claude Code
2026-08-17 19:10:02 +08:00
杨翊 SionYang bd68fcfd35 Merge pull request #15725 from KomachiSion/codex/fix-15560-mcp-auth
[ISSUE #15560] Fix MCP tool passthrough authentication persistence
2026-08-17 16:45:54 +08:00
laomei 524e4b2105 [ISSUE #15675] Support nullable MCP tool output schemas (#15698)
Assisted-by: Claude Code
2026-08-13 15:33:51 +08:00
Lukman Fateh 17e2e142e7 [ISSUE #15660]: Resolve missing ConfigCloneSourceReadPermissionChecker bean in console standalone mode (#15676)
* [ISSUE #15660]: Fix NoSuchBeanDefinitionException for ConfigCloneSourceReadPermissionChecker in standalone console

* [ISSUE #15660] Fix NoSuchBeanDefinitionException for ConfigCloneSourceReadPermissionChecker in standalone console

Remove the direct dependency of ConfigProxy on ConfigCloneSourceReadPermissionChecker
and eliminate the redundant permission check, since ConfigCloneService.cloneConfig()
already performs this check server-side.

Also reverts the scanBasePackages addition to NacosConsole which created tight coupling
between console and config server modules.

Assisted-by: Claude Code
Signed-off-by: elnafateh <elnafatehh@gmail.com>

* [ISSUE #15660] Keep clone source read permission check in console proxy via declared bean

---------

Signed-off-by: elnafateh <elnafatehh@gmail.com>
2026-08-12 16:13:22 +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 2834664d90 chore: roll up console-ui-next dependency fixes (#15645)
Assisted-by: Claude Code
2026-08-04 16:52:29 +08:00
杨翊 SionYang 0e2e7debe3 [ISSUE #14804] Add legacy A2A compatibility routing (#15638)
Preserve the historical Config-backed A2A implementation behind LEGACY while routing legacy APIs to canonical Agent storage by default.

Add conservative AUTO cutover, cross-API integration matrices, and corresponding specifications.

Assisted-by: Claude Code
2026-08-03 16:40: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 5b9a5e7873 [ISSUE #14804] Add Agent Console management UI (#15633)
* [ISSUE #14804] Add Agent Console management UI

Assisted-by: Claude Code

* [ISSUE #14804] Update Agent Console validation record

Assisted-by: Claude Code
2026-08-02 17:06:25 +08:00
sai 9fd4157020 [ISSUE #15620] Fix AI resource review resubmission (#15621)
* Support resubmitting AI resources for review

Unify submit state handling for Skill, Prompt, and AgentSpec while preserving active and historical review semantics.

Assisted-by: Claude Code

* Add review resubmit actions to AI resource consoles

Expose resubmit actions for reviewed and recoverable reviewing versions in both Next and legacy consoles.

Assisted-by: Claude Code
2026-07-31 13:54:07 +08:00
sai a865da30c6 [ISSUE #15618] Fix skill upload version fallback (#15619)
* Fix skill upload version fallback

Try explicit version sources in priority order before generating a server version. Remove targetVersion from the unreleased upload precheck request while retaining the predicted response version.

Assisted-by: Claude Code

* add console static resources
2026-07-30 20:34:29 +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
sai d2656fde2b [ISSUE #15606] Return per-item Skill batch upload results (#15607)
* [ISSUE #15606] Return per-item Skill batch upload results

Return one structured result for each Skill or candidate directory and align errorCode with upload precheck business codes.

Assisted-by: Claude Code

* [ISSUE #15606] Preserve Skill batch upload response compatibility

* [ISSUE #15606] Read wrapped Skill batch results in console
2026-07-30 10:18:33 +08:00
杨翊 SionYang 3f4901b447 [ISSUE #14804] Add Agent Console management facade (#15602)
* [ISSUE #14804] Add Agent Console management facade

Assisted-by: Claude Code

* [ISSUE #14804] Clarify Agent form validation

Assisted-by: Claude Code
2026-07-29 15:51:17 +08:00
杨翊 SionYang cfa255148d [ISSUE #15475] Integrate AI resource importer plugin configuration (#15589)
* [ISSUE #15475] Integrate AI resource importer plugin configuration

Unify AI resource importer builders with plugin configuration management and remove the redundant source abstraction.

Assisted-by: Claude Code

* [ISSUE #15475] Align AI importer OpenAPI error assertions

Update the focused admin and console API integration tests to match the unified plugin lookup error message.\n\nAssisted-by: Claude Code
2026-07-27 15:20:54 +08:00
杨翊 SionYang 279f1ba1ea Add unified plugin configuration console (#15568)
Assisted-by: Claude Code
2026-07-23 19:03:45 +08:00
sai b6895e5503 [ISSUE #15561] Unify Skill upload precheck with ZIP validation (#15562)
* Enhance skill upload precheck result

# Conflicts:
#	console/src/main/resources/static/next/js/client.js

# Conflicts:
#	ai/src/test/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImplTest.java

* Enhance skill upload permission owner reporting

 Conflicts:
	ai/src/main/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImpl.java
	ai/src/test/java/com/alibaba/nacos/ai/service/skills/SkillOperationServiceImplTest.java

* Support ZIP-based skill batch precheck

* [ISSUE #15486] Simplify Skill upload precheck contract

Return a compact single-code precheck result and expose the maximum published version across online and offline versions.

Assisted-by: Claude Code

* [ISSUE #15486] Adapt console UI to compact Skill precheck

Handle precheckCode directly and display the highest published version together with the version after upload.

Assisted-by: Claude Code

* [ISSUE #15486] Rebuild console next UI assets

* [ISSUE #15486] Unify Skill ZIP precheck API

Replace the unpublished metadata precheck contract with multipart ZIP precheck across Admin, Console, and Maintainer APIs. Return invalid ZIP entries with explicit precheck codes and cover the unified contract in specs and tests.\n\nAssisted-by: Claude Code

* [ISSUE #15486] Use server-side ZIP precheck in console UI

Send the original ZIP to the unified precheck endpoint, render server precheck codes, and keep full invalid-entry paths in tooltips while showing concise folder names.\n\nAssisted-by: Claude Code

* [ISSUE #15486] Refresh console assets for ZIP precheck

Regenerate the bundled Console Next assets after adopting the unified server-side Skill ZIP precheck flow.\n\nAssisted-by: Claude Code

* Stabilize OIDC authorization client test timeout
2026-07-23 11:07:31 +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 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
laomei 6402432ea6 [ISSUE #15494] Restore complete MCP tool advanced template support (#15502)
Assisted-by: Codex
2026-07-14 12:05:26 +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 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
sai 9effbd626a [ISSUE #15471] feat(ai): support SkillSpector publish pipeline (#15474)
* feat: support configurable ai pipeline order

* feat: add SkillSpector ai pipeline

* feat: add SkillSpector runner wrapper

* feat: require built-in SkillSpector runtime

* docs: document SkillSpector runtime layout

* docs: move SkillSpector runtime install to nacos-setup

* feat: add pipeline result copy action

* refactor: move SkillSpector runtime under runtimes

* style: refine pipeline result copy action layout

* style: move pipeline copy action after timestamp

* refactor: remove SkillSpector bundled runtime fallback

* refactor: remove unused runtime assembly entries

* chore: rebuild console pipeline assets

* feat: enable skill-spector default lookup

* refactor: remove implicit pipeline default types

* feat: log skill-spector runtime output

* feat: configure skill-spector log level
2026-07-09 14:30:33 +08:00
sai e86b1fcc73 [ISSUE #15466] Correct skill API @Since annotations (#15467)
Update Skill upload related API @Since metadata from 3.2.3 to 3.3.0. This keeps admin, console, and maintainer client API metadata aligned with the 3.3.0 release surface.
2026-07-08 09:43:22 +08:00
杨翊 SionYang e9e5aaa4c2 [ISSUE #15354] Adjust sidebar menu elements (#15455)
Move the sidebar collapse control to the header, place setting center under platform management, and add a user icon to the account dropdown.

Assisted-by: Claude Code
2026-07-06 10:14:28 +08:00
sai 5db14e3733 [ISSUE #15435] Improve next console AI resource version diff (#15436)
* Refine skill diff and resource editing

* Add prompt version diff

* Sync next console static assets

# Conflicts:
#	console/src/main/resources/static/next/css/main3.css
#	console/src/main/resources/static/next/js/FileTreePanel.js
#	console/src/main/resources/static/next/js/index28.js
#	console/src/main/resources/static/next/js/index29.js
#	console/src/main/resources/static/next/js/index32.js
#	console/src/main/resources/static/next/js/index33.js
#	console/src/main/resources/static/next/js/index34.js
#	console/src/main/resources/static/next/js/index35.js
#	console/src/main/resources/static/next/js/main.js
#	console/src/main/resources/static/next/js/skill-store.js
#	console/src/main/resources/static/next/js/vendor-icons.js

* Handle non-text skill version diffs

* Refine AI resource diff interactions

* Fix AI resource file tree rename prop

* Sync next console static assets

* Sync next console static assets
2026-06-29 16:57:37 +08:00
杨翊 SionYang 4c79e2cc4b chore: roll up console-ui-next dependency fixes (#15442)
Assisted-by: Claude Code
2026-06-26 14:46:45 +08:00
杨翊 SionYang 78229d6878 Remove reviewed unused Java code (#15440)
Remove confirmed unused Java methods and classes across AI, common, config, naming, persistence, copilot, CMDB, and client modules.

Mark preserved compatibility candidates as deprecated instead of removing them.

Assisted-by: Claude Code
2026-06-26 13:32:34 +08:00
sai c583506e23 [ISSUE #15420] fix(ai): support lenient skill upload versions (#15421)
* fix: support lenient skill upload versions

Allow invalid uploaded Skill versions to fall back to a generated draft version across precheck, upload, and batch upload.

Add unit coverage for default version fallback, next patch generation, draft overwrite constraints, and raw precheck version reporting.

Assisted-by: Codex

* fix: show converted skill upload versions

Preserve the raw uploaded Skill version for precheck display and show when it is converted to a valid target version.

Update batch precheck item text, locale strings, parser coverage, and rebuilt next console assets.

Assisted-by: Codex

# Conflicts:
#	console/src/main/resources/static/next/js/index23.js

* test: cover lenient skill upload versions

Add OpenAPI IT coverage for invalid uploaded Skill version fallback across admin and console precheck, single upload, and batch upload paths.

Update the API scenario matrices to reflect the new fallback behavior.

Assisted-by: Codex

* fix: normalize short skill upload versions

Normalize numeric short Skill upload versions such as 3 and 2.3 to semver before resolving draft targets.

Keep unrecognized versions on the existing fallback path, and update precheck display and OpenAPI coverage for the new normalization behavior.

Assisted-by: Codex

* fix: clarify normalized skill upload version hints

Explain short version normalization separately from final draft version adjustment when the normalized version already exists.

Update batch precheck text and rebuilt next console assets.

Assisted-by: Codex
2026-06-25 21:06:05 +08:00
sai 97d830bcae [ISSUE #15428] Fix MCP endpoint URL query preservation (#15429)
* Fix MCP endpoint URL query preservation

# Conflicts:
#	console-ui-next/src/pages/newMcpServer/index.tsx

* rebuild console-ui-next static assets
2026-06-25 15:46:18 +08:00
杨翊 SionYang feaab43ccd [ISSUE #14466] Add typed pipeline maintainer APIs (#15424)
* [ISSUE #14466] Add typed pipeline maintainer APIs

Expose Pipeline maintainer execution queries with PipelineExecution DTOs while keeping deprecated JsonNode compatibility methods.

Assisted-by: Claude Code

* [ISSUE #14466] Stabilize AI cache event tests

Assisted-by: Claude Code
2026-06-25 12:01:06 +08:00
杨翊 SionYang aa27c40a52 [ISSUE #14466] Move pipeline execution DTOs to api (#15422)
* [ISSUE #14466] Move pipeline execution DTOs to api

Assisted-by: Claude Code

* [ISSUE #14466] Fix console pipeline DTO imports

Assisted-by: Claude Code
2026-06-25 10:03:33 +08:00
杨翊 SionYang 3e34a6e8c4 [ISSUE #14466] Migrate maintainer client JSON parsing (#15373)
* [ISSUE #14466] Migrate maintainer client JSON parsing

Replace maintainer-client HTTP response parsing with neutral JsonUtils and NacosTypeReference while keeping legacy pipeline JsonNode compatibility.

Assisted-by: Claude Code

* Fix maintainer config boolean result unwrap

Assisted-by: Claude Code

* Fix copilot config idempotent save result

Assisted-by: Claude Code

* Fix copilot config maintainer context path

Assisted-by: Claude Code

* Fix copilot config console storage path

Assisted-by: Claude Code

* Stabilize copilot config controller test

Assisted-by: Claude Code

* Register selector subtypes for JsonUtils

Assisted-by: Claude Code

* Stabilize maintainer beta cleanup

Assisted-by: Claude Code
2026-06-24 16:22:11 +08:00
sai 2f8d884c9c [ISSUE #15315] Optimize Skill upload precheck and conflict handling (#15316)
* feat(ai): optimize upload skill with precheck, uploadAction and commitMsg support

- Add precheck endpoint for upload validation before actual upload
- Support uploadAction parameter (create_draft/overwrite_draft/create_version)
- Support commitMsg parameter for version commit messages
- Add SkillUploadPrecheckRequest/Result models in API module
- Refactor SkillOperationServiceImpl upload flow with UploadVersionCandidate
- Update SkillZipParser to extract version from skillMd front-matter
- Add upload precheck support to Console/Admin/Maintainer layers
- Update skill-spec documentation for new upload workflow
- Add integration tests for upload precheck scenarios

* feat(ui): upload skill dialog with precheck and conflict resolution

- Refactor UploadSkillDialog to use precheck-then-upload two-step flow
- Add client-side ZIP parsing with skillUploadParser utility
- Show parsed skill info (name, version, description) before upload
- Handle conflict scenarios: version exists, no permission, etc.
- Add uploadAction selection UI for overwrite/create options
- Support commitMsg input for version publishing
- Update locales (en-US, zh-CN) with new upload dialog strings
- Add unit tests for skillUploadParser

* chore(ui): rebuild console-ui-next static assets

Regenerated from source changes in the previous commit.

# Conflicts:
#	console/src/main/resources/static/next/js/main.js

* Strip wrapper directory from skill resources

* Update console static skill upload assets

* test: align skill upload precheck path

* test: align skill upload precheck path
2026-06-17 11:22:48 +08:00
Zhengcy05 e82c834b9e [ISSUE #15321] Feat:Update the disk cache by refreshing asynchronously (#15336)
* feat:Update the disk cache by refreshing asynchronously

* fix:spotless:check

* fix: Add more tests to improve coverage

* fix: rollback changes to EnvUtil

* fix: Rebase develop
2026-06-16 14:25:47 +08:00
Jason ab1ee0ad92 [ISSUE #15296] Fix instance status not updating after toggle in service detail (#15348)
* [ISSUE #15296] Fix instance toggle not updating service detail UI

The console instance list endpoint serves a cached view that is refreshed asynchronously after an accepted write (naming ServiceStorage cache, push task delay defaults to 500ms), so refetching immediately after updateInstance rendered the old enabled state and the toggle appeared to need two clicks.

Patch the confirmed values into local state instead of refetching, the same approach the legacy console InstanceTable uses. Apply the same handling to the edit-instance dialog, which refetched the service detail and every cluster instance list through the same stale cache.

Assisted-by: Claude Code

* [ISSUE #15296] Fix deleted instance reappearing in service detail

The instance list endpoint serves a cached ServiceInfo that is refreshed asynchronously after an accepted write, so refetching right after deleteInstance can render the deleted row again. Remove the row from local state instead, the same confirmed-local-update approach already used for the online/offline toggle and the edit-instance dialog.

The previous-page navigation (deleting the last row of a page > 1) still has to fetch since that page is not held locally; the local removal afterwards scrubs the deleted row when the fetched page is still served from the stale cache. The service detail refetch is dropped: the only service-level field a delete can change is the cluster set, which the detail endpoint reads from the same lagging cache, so an immediate refetch cannot observe that change either.

Assisted-by: Claude Code

* [ISSUE #15296] Update console next static assets

Rebuilt console-ui-next static assets (npm ci && npm run build) for the instance toggle and delete fixes. No visual changes are included.

Assisted-by: Claude Code
2026-06-15 14:45:47 +08:00
sai 491420904b [ISSUE #15346] Manage AI resource latest label on server (#15347)
* Manage AI resource latest label on server

* Lock latest label editing in console

* Exclude target directories from RAT checks

* Unify prompt publish lifecycle handling

* Align prompt lifecycle controls with skill

* Refresh prompt latest mirror from server label

* Ignore deprecated latest update flag

* Align prompt pipeline completion lifecycle

* Update console static assets for AI resource latest labels

* Fix AI resource latest label CAS handling

* Stabilize distro client data processor test

* Fix AI resource working version CAS retry

* Fix skill zip root descriptor parsing
2026-06-11 16:29:51 +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
杨翊 SionYang 39db5392a3 [ISSUE #14879] Remove legacy console Nacos starter (#15340)
Remove the deprecated console-side com.alibaba.nacos.Nacos starter now that the legacy Spring integration tests have been removed.

Clean native-image metadata entries that still referenced the old starter. NacosBootstrap remains the packaged server entry.

Assisted-by: Claude Code
2026-06-09 17:20:07 +08:00
帝皇侠 b3fd6634cc [ISSUE #15279]feat(lock): implement distributed reentrant/non-reentrant lock (#15280)
* feat(lock): implement distributed reentrant/non-reentrant lock with watchdog, wait queue and gRPC push notification

Phase 1 of the Nacos distributed lock system:
- Reentrant and non-reentrant lock types with owner-based identity
- Watchdog auto-renewal mechanism (30s timeout, 10s renewal interval)
- Wait queue with FIFO semantics and gRPC server-push notifications
- Raft consensus integration for strong consistency across cluster
- Connection disconnect detection with automatic lock release via Raft
- Lock expiration scanner with Raft-path release
- Defensive copy for waitQueue access and null-owner guard in scanner
- Client SDK implementing JUC Lock interface (lock/tryLock/unlock)
- 44 unit tests + 35 integration tests covering core flows and edge cases

* feat(lock): implement distributed reentrant/non-reentrant lock with watchdog, wait queue and gRPC push notification

Phase 1 of the Nacos distributed lock system:
- Reentrant and non-reentrant lock types with owner-based identity
- Watchdog auto-renewal mechanism (30s timeout, 10s renewal interval)
- Wait queue with FIFO semantics and gRPC server-push notifications
- Raft consensus integration for strong consistency across cluster
- Connection disconnect detection with automatic lock release via Raft
- Lock expiration scanner with Raft-path release
- Defensive copy for waitQueue access and null-owner guard in scanner
- Client SDK implementing JUC Lock interface (lock/tryLock/unlock)
- 44 unit tests + 35 integration tests covering core flows and edge cases

* fix(lock): prevent self-deadlock on non-reentrant lock reentry from same thread

Non-reentrant lock reentry on the same thread previously sent the request to
the server, which rejected it and placed the thread in the wait queue, causing
self-deadlock (thread waits for itself to release the lock). Add a client-side
guard (checkReentrantGuard) that throws IllegalMonitorStateException before any
network call when the current thread already holds the lock.

* fix(lock): connection disconnect fully releases reentrant locks via force release

releaseLocksByConnection() previously called unLock() once per lock, which only
decremented reentrantCount by 1. For locks acquired N times, the dead connection
held the lock with count N-1 until expiry.

Add forceRelease flag to MutexLockRequest. When set, onApply calls
forceRelease() which clears reentrantCount/owner/expiry in a single Raft
round-trip. releaseLocksByConnection() now uses this path.

* fix(lock): enforce FIFO wait queue semantics to prevent queue-jumping

Previously, acquireLock() allowed any new request to acquire a released
lock even when waiters were queued, breaking FIFO ordering. This fix:

- Add waiterRetry flag (LockInstance/LockInfo) so the server can
  distinguish queue re-entries from new requests
- Force-release and re-enqueue new requests when the wait queue is
  non-empty, preventing queue-jumping
- Change pollFirstWaiter() to peekFirstWaiter() on unlock/expire so
  entries stay in the queue until the waiter actually re-acquires
- Add removeStaleWaiter() for cleaning up entries on non-head retry
- Add FIFO integration tests (JUC-021, JUC-022)

Fixes: FIFO wait queue semantics not enforced in acquireLock()

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(lock): deduplicate wait queue entries by owner and connection

addWaiter() now checks for an existing entry with the same
owner+connectionId before inserting. If found, it updates the
deadline instead of adding a duplicate. This prevents queue
bloat when LockGrpcClient retries ACQUIRE during notification
wait, and avoids duplicate notifications for the same waiter.

Fixes: blocking lock retry causes duplicate entries in wait queue

* test(lock): add unit tests for distributed lock module

- NonReentrantAtomicLockTest: lock/unlock, reentry rejection, forceRelease, autoExpire
- AbstractAtomicLockTest: renew, isClear, hasWaiters, removeStaleWaiter, drainAllWaiters, removeExpiredWaiters, peekFirstWaiter with expired entries, null input handling, dedup
- MutexAtomicLockTest: migrateFromLegacy (FULL/EMPTY/null/idempotent)
- LockOperationServiceImplTest: acquireLock FIFO enforcement, releaseLock normal/force, renewLock, expireLock
- WaitEntryTest: isExpired, constructor, setters
- LockKeyTest: equals, hashCode, toString, getters/setters
- LockService: add @Since("3.3.0") to renew method

* fix(lock): use Raft CLEANUP_CONNECTION for connection disconnect cleanup

Replace direct forceUnLock with a Raft-consensus CLEANUP_CONNECTION
operation to ensure cluster-wide consistency for lock releases and
wait queue cleanup when a connection disconnects.

Also async-ize pushWithoutAck calls via notificationExecutor to avoid
blocking the Raft FSM thread on push failures.

* fix(lock): fix doUnLock semantics, endTime NPE risk, and showLocks encapsulation

- ReentrantAtomicLock/MutexAtomicLock/NonReentrantAtomicLock: doUnLock
  now returns false when the lock is not held, instead of silently
  succeeding and corrupting state
- LockInfo.endTime: Long → long to eliminate auto-unboxing NPE in
  AbstractAtomicLock.renew()
- LockManager.showLocks() returns Collections.unmodifiableMap();
  NacosLockManager.getRawLockMap() added for snapshot internals
- NacosLockSnapshotOperation uses getRawLockMap() for putAll()
- Add test for unlocking an unheld lock (null-owner bypass path)

* fix(lock): remove unused import, fix Javadoc placement, and add missing license header

* fix(lock): fix FIFO notification gap, ThreadLocal leak, batch cleanup, and metrics

- Add notifyFirstWaiter() after FIFO force-enqueue in acquireLock()
- Clean up ThreadLocal entries in NacosLock.unlock() when reentrantCount reaches 0
- Batch connection cleanup into single Raft consensus instead of N separate writes
- Add RENEW metrics (grpcRenewSuccess/grpcRenewTotal) to LockMetricsMonitor
- Add LockNotificationType enum replacing raw strings for notification types
- Add try-catch in async push callbacks for consistent error handling
- Copy lock map before snapshot serialization to avoid UnmodifiableMap issues
- Add owner null check in LockExpireScanner to reduce unnecessary Raft submissions

* fix(lock): enforce strict FIFO in acquireLock by skipping tryLock when queue has waiters

New requests no longer acquire-then-forceRelease when the wait queue is
non-empty. Instead, acquireLock() checks hasWaiters() before calling
tryLock(), and directly enqueues non-retry requests behind existing
waiters. This eliminates the unnecessary acquire-release dance while
maintaining strict FIFO ordering.

* test(lock): add cluster JUC lock concurrency stability IT

* Format distributed lock code

* test(lock): add lock waiter retry reproduction tests

Add lock-test coverage for non-head waiterRetry acquisition and stale waiter behavior.

* fix(lock): fix lock wait queue cancellation handling

Add server-side wait cancellation for interrupted lock acquisition and cover FIFO retry/cancel paths.

* fix(lock): improve stability and edge case handling for distributed lock

- Fix ThreadLocal leak in unlock() when server exception occurs
- Fix tryLock(time,unit) interrupt/timeout server queue cleanup
- Add null-safe response parsing in LockGrpcClient
- Add closed-state guard in NacosLockService and LockGrpcClient
- Add setResultCode in LockOperationResponse factory methods
- Clear stale state on LockResult.setSuccess(true)
- Remove empty shell locks in LockExpireScanner
- Remove HashMap copy in LockExpireScanner iteration

* fix(lock): improve lock stability, fix bugs, and add unit tests

- Remove redundant lock acquisition in AbstractAtomicLock subclass methods
- Fix deadline reset bug in tryLockAsQueueHead that prevented waiter expiration
- Fix watchdog NacosException not triggering unregister
- Change LockInstance.expiredTime from Long to long to avoid NPE risk
- Fix forceRelease not clearing connectionId field
- Add unit tests for AbstractAtomicLock, LockRequestHandler, LockExpireScanner,
  LockInfo, NacosLockWatchdog, NacosLock, and NacosLockInterrupt

* Fix CI failures - spotless formatting

* fix(lock): change lock model fields from primitive to boxed types and rename waitTimeMs to waitTime

LockInstance: expiredTime long→Long, waitTimeMs→waitTime Long
LockInfo: endTime long→Long, waitTimeMs→waitTime Long
Update all callers and unit tests accordingly.

* test: improve lock coverage

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 10:12:53 +08:00
杨翊 SionYang 053a7ffb20 [ISSUE #15322] Remove config migration server code (#15325)
Remove ConfigMigrateService and ConfigCompatibleConfig runtime entry points, drop config namespace and gray compatibility switches, and detach publish/delete/sync/dump paths from legacy migration behavior.

Synchronize directly affected tests with the removed server APIs.

Assisted-by: Claude Code
2026-06-08 15:30:08 +08:00
blake.qiu 3f9192f3e0 fix(15265): AI skill list rejects skillName used as a query condition when it starts or ends with a hyphen. (#15273) 2026-06-04 20:25:23 +08:00