AsperforMias opened a new issue, #1648:
URL: https://github.com/apache/dubbo-admin/issues/1648
### Environment
- Deploy env: vm (local), Dubbo Admin develop (65bce33)
- Dubbo application version: dubbo-go 3.3.2 and develop
- Registry: Nacos v2.5.2, ZooKeeper 3.9.4
### Issue description
A condition rule cannot be created from the UI, neither with the form nor
with the YAML view. Existing rules can still be edited, disabled and deleted.
**Form view**
(`ui-vue3/src/views/traffic/routingRule/tabs/addByFormView.vue`): the rule name
is built as `<application>` or `<service>:<version>:<group>`, without the
`.condition-router` suffix, and passed to `addConditionRuleAPI`. The backend
rejects every name that does not end with `.condition-router`
(`pkg/console/handler/condition_rule.go`), so creation always fails with HTTP
400.
**YAML view**
(`ui-vue3/src/views/traffic/routingRule/tabs/addByYAMLView.vue`): the
application-scope branch checks `key == 'application'` instead of `scope ==
'application'`. An application-scope rule (whose `key` is the application name)
therefore falls into the service branch and is rejected with "请先填写版本和分组字段"
unless a version and group are filled in, and the resulting name is then built
as a service-level name.
Expected: the form and the YAML view create `<application>.condition-router`
for application scope and `<service>:<version>:<group>.condition-router` for
service scope.
Workaround: create the rule through `POST /api/v1/condition-rule/<rule
name>?mesh=<mesh>` with the full name.
### Logs
<details><summary>Click me to check logs</summary>
```
POST /api/v1/condition-rule/router-demo-server?mesh=nacos-local
400 {"code":...,"message":"ruleName must end with .condition-router"}
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]