migrate-apim: handled elements are skipped before expression analysis, so policy-driven backend selection leaves no trace in the plan
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 18
- Forks
- 9
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 23
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/aigateway
-
How do I use the AI Gateway to route to ADO Remote MCP Server?Posiblemente ocupada @santiagxf la tomó hoy. Abiertoquestion
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
Azure/aigateway#72 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Playground testing to external claude enterprise fails from AI GatewayPosiblemente ocupada @santiagxf la tomó hoy. Abiertoinvestigate
Dificultad 3/5 1-2 días Aptitud para principiantes 53/100
Azure/aigateway#71 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
migrate-apim: partialWhen conditions are declared in the schema and implemented in the planner, and nothing checks the two agreePosiblemente ocupada @santiagxf la tomó hoy. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
Todos los issues de Azure/aigateway
Issues similares
-
roadmap/v1.3.0 scope/entitlement type/improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
databrickslabs/ontos#1778 ·
Los mantenedores suelen responder en 2 días
-
bug good first issue help wanted up-for-grabs
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ClickHouse/loom#2075 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: pip install -U cudaq-qec fails with a conflict that names cudaq-qec itselfPosiblemente ocupada @fedonman la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 69/100
StevenBlack/hosts#3314 ·
-
task
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SparseLinearAlgebra/spla#316 · 1 comentario ·
Los mantenedores suelen responder en 1 día