migrate-apim: handled elements are skipped before expression analysis, so policy-driven backend selection leaves no trace in the plan
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 18
- Fork
- 9
- Merge medio
- 1g 16h
- PR unite (30g)
- 23
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/aigateway
-
How do I use the AI Gateway to route to ADO Remote MCP Server?Forse già presa @santiagxf l’ha presa oggi. Apertaquestion
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
Azure/aigateway#72 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Playground testing to external claude enterprise fails from AI GatewayForse già presa @santiagxf l’ha presa oggi. Apertainvestigate
Difficoltà 3/5 1-2 giorni Idoneità per principianti 53/100
Azure/aigateway#71 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
migrate-apim: partialWhen conditions are declared in the schema and implemented in the planner, and nothing checks the two agreeForse già presa @santiagxf l’ha presa oggi. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Azure/aigateway
Issue simili
-
roadmap/v1.3.0 scope/entitlement type/improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
databrickslabs/ontos#1778 ·
I maintainer di solito rispondono entro 2 giorni
-
bug good first issue help wanted up-for-grabs
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ClickHouse/loom#2075 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: pip install -U cudaq-qec fails with a conflict that names cudaq-qec itselfForse già presa @fedonman l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 69/100
StevenBlack/hosts#3314 ·
-
task
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
SparseLinearAlgebra/spla#316 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno