Condition rule form drops routes that specify only a destination

未关闭 适合新手
#1,658 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 8 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
go, typescript

调研方向

从 ui-vue3/src/views/traffic/routingRule/composables/useRoutingRule.ts 中的 mergeConditions() 开始,并检查 PR #1650 中相关的组件测试。查看请求匹配为空但有目标的行如何序列化,然后验证发出的 POST 请求体保留该条件,同时跳过完全为空的行。instance.go 示例展示了仅含目标的条件格式。

由索引模型根据 Issue 内容生成。

描述

The condition routing form drops a route when the user sets a destination and leaves the request match empty. This prevents the form from expressing a route that applies to every request. A component test on PR #1650 at 3a724901 reproduced the payload below. The same serialization code is present on develop at 62d15aff.

Steps to reproduce
  1. Open the condition rule creation form, choose application scope, and enter an application name such as demo-server.
  2. Leave the request match empty. In the route destination, select host, choose =, and enter 10.0.0.1.
  3. Click Confirm and inspect conditions in the outgoing POST body.

Actual: The form sends "conditions": []. If other rows have request matches, those rows are retained and the destination-only row is silently omitted.

Expected: The payload contains a condition equivalent to =>host=10.0.0.1, so the destination filter applies to every request. A completely empty row can still be skipped. Admin already generates destination-only conditions such as =>host!=<IP> when disabling traffic to an instance.

mergeConditions() only appends rows with a nonempty request match · Backend example

Related to #1648 and #1650. The omission is visible in the request body before the server validates the rule name.

主要语言
Go
星标
4.1k
派生
2.2k
平均合并
6 天 2 小时
30 天内合并 PR
4

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/dubbo-admin 的其他 Issue

查看 apache/dubbo-admin 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。