Skip to content

Implement DELETE Instance API and UI in Console v3 #14980

@Wyhhhh24

Description

@Wyhhhh24

Is your feature request related to a problem? Please describe.

  • Yes. In Console v3 Naming service detail, instance deletion was missing
  • The Console instance API only supported list and update, but not delete
  • Because of this, users could not deregister instances directly from the Console UI

Describe the solution you'd like
Add full instance delete support in Console v3:

  • Add DELETE /v3/console/ns/instance in Console instance controller with Console API permission (WRITE)
  • Extend instance handling chain in console backend:
    • InstanceHandler adds removeInstance
    • Proxy forwards removeInstance
    • Inner handler uses naming remove logic
    • Remote handler delegates to maintainer client deregister logic
    • Noop handler keeps consistent behavior when naming is disabled
  • Add/extend backend unit tests for controller/proxy/handler delete flow
  • Add frontend support in Console UI Next:
    • API method for DELETE /v3/console/ns/instance
    • Delete action button in service detail instance table
    • Confirmation dialog before deletion
    • Refresh instance list after success (including pagination fallback)
    • i18n messages for zh-CN and en-US

Describe alternatives you've considered

  • Calling /v3/admin/ns/instance directly from frontend: rejected due to API boundary and Console architecture expectations
  • Keeping only online/offline without delete: rejected because users still need real deregistration
  • Manual API calls via scripts/curl: works as workaround but not acceptable as normal Console UX

Additional context

  • Scope: console + console-ui-next only
  • API added: DELETE /v3/console/ns/instance
  • This aligns with the documented limitation and closes the missing capability on the Console instance page
  • Focused backend tests for the new delete chain are already prepared and passing locally

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions