Condition rule form drops routes that specify only a destination

オープン 初心者向け
#1,658 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 8 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/dubbo-admin のほかの issue

apache/dubbo-admin の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。