Plugin config unmarshal failures still log-and-skip in consumer.go, gateway.go and policies.go
Los mantenedores suelen responder en 3 días
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
Rastrea los puntos de log-and-skip en internal/adc/translator/consumer.go, gateway.go y policies.go, y después inspecciona adc_validation.go y gatewayproxy_webhook.go para determinar qué fallos son observables. Revisa el comportamiento de envtest descrito para los CRD generados, incluido mergeL4PolicyPlugins. Se considera terminado cuando cada ruta tiene una convención de fallo intencionada y documentada, con cobertura para el comportamiento del plugin o la policy afectados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
#441 made the apiv2 plugin-config paths fail closed: a config that does not unmarshal into an object now fails translation instead of publishing the plugin with an empty config. Several equivalent sites still log the error and continue, so the plugin silently vanishes and the resource reconciles green.
Still on the log-and-skip path:
| Site | What is dropped |
|---|---|
internal/adc/translator/consumer.go |
v1alpha1 Consumer credential config, and Consumer plugins |
internal/adc/translator/gateway.go |
GatewayProxy plugins and pluginMetadata (gateway-wide blast radius) |
internal/adc/translator/policies.go |
L4RoutePolicy plugins (mergeL4PolicyPlugins) |
The failure mode differs from the one #441 fixed — these continue, so the plugin disappears rather than becoming {} — but the user-visible outcome is the same class: the plugin does not run and nothing reports a problem. Left as is, the tree carries two deliberate and opposite conventions for the same situation.
Expected behavior
Settle on one convention per path. The right treatment is not uniform, because it depends on whether the failure is observable:
- v1alpha1
Consumer—adc_validation.goalready has acase *v1alpha1.Consumer, so the admission webhook runs the real translator and a returned error is rejected at apply time. Fail closed here, matching apiv2ApisixConsumer. GatewayProxy— needs a check of whethergatewayproxy_webhook.govalidates through the translator. If not, failing closed would be silent, and the failure needs a status condition first.L4RoutePolicy— no webhook. Same caveat: decide how the failure surfaces before changing the behavior.
Whichever way each one lands, the PR should say why, so the convention is documented rather than implicit.
Notes
mergeL4PolicyPlugins also carries an explicit cfg == nil normalization for a literal config: null. That branch is unreachable: for a field typed apiextensionsv1.JSON with x-kubernetes-preserve-unknown-fields and no nullable: true, the API server prunes the explicit null, so Config.Raw arrives empty and the len(Raw) > 0 guard skips the unmarshal entirely. Verified with envtest against the generated CRDs, on both ApisixRoute and ApisixPluginConfig. Worth removing while the file is being touched.
Context
Raised in review on #441.
Upstream: apache/apisix-ingress-controller#2842
- Lenguaje dominante
- Go
- Estrellas
- 5
- Forks
- 5
- Merge medio
- 5 d 16 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
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 api7/api7-ingress-controller
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
api7/api7-ingress-controller#477 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
api7/api7-ingress-controller#462 · 4 comentarios · 1 reacción ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
api7/api7-ingress-controller#458 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
api7/api7-ingress-controller#453 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 3 días
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
api7/api7-ingress-controller#448 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 3 días
Todos los issues de api7/api7-ingress-controller
Issues similares
-
bug frontend grammar sev-3
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
-
connector docs good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
soma-intelligence/open-health-sync#134 ·
Los mantenedores suelen responder en 1 día
-
bug frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
oss/0 pending team/container-integrations
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
DataDog/datadog-agent#58323 ·
Los mantenedores suelen responder en 1 día