apache / apache/rocketmq-dashboard
[Studio][Bug] Cloud instance edit dialog lets you edit the endpoint but the backend silently ignores it
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 683
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 58
Description
**Problem**
Editing a cloud (Aliyun/Tencent) instance opens a dialog where the **接入地址 (endpoint)** field is fully editable. Saving always reports `实例「{name}」已更新` success — but the backend silently drops the endpoint for cloud vendors, so the change is never persisted.
**Evidence**
- Backend `InstanceService.updateInstance` (lines ~589–600): `boolean cloudInstance = existing.getVendor() != null && existing.getVendor() != InstanceVendor.APACHE;` and only `if (!cloudInstance) { ... updated.setEndpoint(requireValidEndpoint(instance.getEndpoint())); }`. Cloud endpoints are resolved from the cloud catalog (`resolveEndpoint(detail)`, `InstanceService.java:512`) and `createCloudInstance` even rejects a manually supplied endpoint (`"Commercial instances must be selected from the cloud catalog, endpoint cannot be set manually"`).
- Frontend `web/src/pages/instance/index.tsx`: the edit dialog's endpoint `Input` is unconditional (no vendor gating — only `adminCredentialRef` is gated to `vendor === 'APACHE'`), and `handleUpdate` posts `endpoint: values.endpoint` then unconditionally shows `message.success(t('instance.updated', { name }))`.
**Impact**
The operator edits what looks like a critical connection setting, sees a success toast, and only discovers on the next connection failure that the endpoint never changed. The UI text itself states the intent — `instance.cloudEndpointExtra`: "云服务实例接入地址由云厂商目录解析,不支持手动修改" — but the input ignores it.
**Expected behavior**
For cloud vendors the endpoint is rendered read-only (disabled), matching the documented intent and the backend contract; Apache instances remain editable (regression-tested).
**Related work**
- #3937 (vendor filter/pagination) touches the same page but not the edit dialog; searched "instance edit endpoint / cloud endpoint edit / endpoint not saved" — no Issue or PR covers this.
**PR**
Fix: #4177
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in web/src/pages/instance/index.tsx, then compare the edit behavior with InstanceService.updateInstance and the cloud endpoint resolution described in the issue. Done means cloud-vendor endpoint fields are read-only while Apache remains editable, with the Apache behavior regression-tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- backend, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100