Skip to content

feat(console):Add persistent instance deregistration support in Console v3#14985

Open
Wyhhhh24 wants to merge 8 commits intoalibaba:developfrom
Wyhhhh24:feat/console-v3-instance-delete
Open

feat(console):Add persistent instance deregistration support in Console v3#14985
Wyhhhh24 wants to merge 8 commits intoalibaba:developfrom
Wyhhhh24:feat/console-v3-instance-delete

Conversation

@Wyhhhh24
Copy link
Copy Markdown
Contributor

@Wyhhhh24 Wyhhhh24 commented Apr 24, 2026

Please do not create a Pull Request without creating an issue first.

What is the purpose of the change

Add persistent instance deregistration support for Console v3 Naming service detail.
Previously, Console v3 only supported listing and updating service instances, but users could not deregister persistent instances directly from the Console UI. This change adds the missing delete capability for persistent instances (ephemeral=false) while explicitly keeping ephemeral instances out of scope, following the maintainer guidance.
Fixes #14980

Brief changelog

  • Add DELETE /v3/console/ns/instance in Console instance controller
  • Restrict Console delete operation to persistent instances only, and reject ephemeral=true requests explicitly
  • Extend Console instance handling chain with removeInstance:
    • InstanceProxy
    • InstanceHandler
    • InstanceInnerHandler
    • InstanceRemoteHandler
    • InstanceNoopHandler
  • Use naming remove logic in inner mode and maintainer deregister logic in remote mode
  • Add frontend delete support in console-ui-next
  • Show delete action only for persistent instances in service detail page
  • Add delete confirmation dialog, success toast, refresh handling, and pagination fallback
  • Add zh-CN / en-US i18n messages
  • Add focused backend unit tests for delete flow and ephemeral rejection

Verifying this change

  • Confirmed UI only renders delete action for ephemeral=false
  • Confirmed frontend delete request uses Console API boundary: /v3/console/ns/instance
  • Confirmed backend controller rejects ephemeral=true delete requests
  • Confirmed delete chain is wired through proxy, handler, inner, remote, and noop implementations
  • Confirmed delete behavior keeps existing Console default semantics when ephemeral is omitted
  • Confirmed focused backend unit tests cover:
    • persistent instance delete success
    • default persistent delete path
    • ephemeral instance delete rejection
    • proxy / inner / remote delete delegation

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). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. 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 to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean package apache-rat:check spotbugs:check -DskipTests to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

@github-actions
Copy link
Copy Markdown

Thanks for your this PR. 🙏
Please check again for your PR changes whether contains any usage/api/configuration change such as Add new API , Add new configuration, Change default value of configuration.
If so, please add or update documents(markdown type) in docs/next/ for repository nacos-group/nacos-group.github.io


感谢您提交的PR。 🙏
请再次查看您的PR内容,确认是否包含任何使用方式/API/配置参数的变更,如:新增API新增配置参数修改默认配置等操作。
如果是,请确保在提交之前,在仓库nacos-group/nacos-group.github.io中的docs/next/目录下添加或更新文档(markdown格式)。

Copy link
Copy Markdown
Contributor Author

@Wyhhhh24 Wyhhhh24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please recheck,Thanks.

@KomachiSion
Copy link
Copy Markdown
Collaborator

@Wyhhhh24 need update the console API document please.

@KomachiSion KomachiSion added kind/feature type/feature area/Naming area/Nacos console Related to Nacos consle labels Apr 29, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Wyhhhh24
Copy link
Copy Markdown
Contributor Author

image Am I modifying the API documentation here?

@KomachiSion
Copy link
Copy Markdown
Collaborator

image Am I modifying the API documentation here?

yes

@Wyhhhh24
Copy link
Copy Markdown
Contributor Author

IModifications have been completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/Nacos console Related to Nacos consle area/Naming kind/feature type/feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement DELETE Instance API and UI in Console v3

3 participants