migrate-apim: handled elements are skipped before expression analysis, so policy-driven backend selection leaves no trace in the plan
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Start in plan.py at _policies() around line 879 and trace how policy elements reach _apply_partial_when(); then read the element-name rules in capability.py around lines 185–197. Check the statement-wrapper handling around plan.py line 1842 and compare how handled managed identity is represented around lines 290, 346, and 1134. Done means conditional or expression-driven set-backend-service routing is visible in the plan without changing sound handled cases.
索引モデルが issue の本文から書いたものです。
説明
Summary
_policies() drops handled and notApplicable elements before any further inspection (plan.py:879):
if not rule or rule["verdict"] in {"notApplicable", "handled"}:
continue
This happens before _apply_partial_when() on the next line, and element-name rules win over the hasExpression fallback by design (capability.py:185-197). The combination means set-backend-service — verdict handled, rationale "Backend selection becomes the alias backend pool" — is skipped regardless of what it actually does:
<set-backend-service backend-id="@(expression)" />, an arbitrary C# routing decision.set-backend-servicenested underchoose/when, which_STATEMENT_WRAPPERS(plan.py:1842) correctly treats as a statement, so the element is classified and then discarded.
The alias backend pool is built from the APIM backend pool, which carries none of that conditional logic. The result is no item, no gap, and nothing in the plan recording that routing logic existed.
Why this matters here specifically
The project's governing rule is that a failed inference must not read as a confident negative, and collect already closed the analogous hole on the inventory side — referencedBy now scans policy text and expressions, because "a backend id built inside a policy expression was invisible."
The planner has the same hole one level up, and handled is a stronger claim than gap: it asserts that another object carries this.
By contrast, authentication-managed-identity is a sound handled — the provider item genuinely carries it (plan.py:290, 346) and raises the matching RBAC prerequisite (plan.py:1134). The verdict itself isn't the problem; skipping before analysis is.
Suggested fix
For a handled rule, still emit a cross-reference or raise an item when the element carries an expression (expressionIds non-empty) or sits under a conditional path, so the plan says the routing logic existed and what became of it.
Found while documenting the migration flow. Derived from reading the source; not reproduced against a live APIM instance.
- 主要言語
- Python
- スター
- 18
- フォーク
- 9
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 23
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Azure/aigateway のほかの issue
-
How do I use the AI Gateway to route to ADO Remote MCP Server?対応中かも @santiagxf が今日担当しました。 オープンquestion
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
Azure/aigateway#72 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Playground testing to external claude enterprise fails from AI Gateway対応中かも @santiagxf が今日担当しました。 オープンinvestigate
難易度 3/5 1〜2日 初心者へのやさしさ 53/100
Azure/aigateway#71 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
migrate-apim: partialWhen conditions are declared in the schema and implemented in the planner, and nothing checks the two agree対応中かも @santiagxf が今日担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
Azure/aigateway の issue をすべて見る
似ている issue
-
roadmap/v1.3.0 scope/entitlement type/improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
databrickslabs/ontos#1778 ·
メンテナーはふだん 2 日以内に返信
-
bug good first issue help wanted up-for-grabs
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ClickHouse/loom#2075 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: pip install -U cudaq-qec fails with a conflict that names cudaq-qec itself対応中かも @fedonman が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 69/100
StevenBlack/hosts#3314 ·
-
task
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
SparseLinearAlgebra/spla#316 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信