fix(kubernetes): missing `kubernetes_kind` or `attribute_path` errors are dropped
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Empieza en src/tirith/providers/kubernetes/handler.py, donde get_value devuelve los resultados "kubernetes_kind must be provided" y "attribute_path must be provided" en lugar de añadirlos a outputs, y provide() descarta el valor de retorno. Reproduce con la llamada que aparece en el issue y luego añade una prueba en tests/providers/kubernetes/ que espere un resultado con el err correspondiente por cada argumento faltante. Está terminado cuando ambos casos devuelvan ese error y pytest tests/ pase.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
In src/tirith/providers/kubernetes/handler.py, get_value returns the "kubernetes_kind must be provided" and "attribute_path must be provided" results instead of appending them to outputs. provide() ignores the return value, so it returns [] and the policy author never sees the error.
To reproduce:
from tirith.providers.kubernetes.handler import provide
provide({"operation_type": "attribute", "attribute_path": "spec"}, [{"kind": "Pod", "spec": {}}])
# -> []
What to change
Append both error results to outputs (as the "kind is not found" branch already does) and return.
Done when
A new test in tests/providers/kubernetes/ calls provide() without each argument and gets one result carrying the matching err.
Comment to claim this issue and wait to be assigned. Unclaimed or inactive for 3 days, it returns to the pool. Run pytest tests/ and black --line-length 120 before opening the PR.
- Lenguaje dominante
- Python
- Estrellas
- 170
- Forks
- 46
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 9
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 StackGuardian/tirith
-
chore: remove stale TODOs and commented-out codePosiblemente ocupada @krishna2707 la tomó hace 2 días. Abiertochore good first issue hacktoberfest
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
StackGuardian/tirith#408 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
test(evaluators): edge cases for `Equals` and `NotEquals`Posiblemente ocupada @Ankit-cs la tomó hace 1 día. Abiertogood first issue hacktoberfest tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
StackGuardian/tirith#406 ·
Los mantenedores suelen responder en 1 día
-
test(kubernetes): cover the provider's main pathsPosiblemente ocupada @afsuyadi la tomó hoy. Abiertogood first issue hacktoberfest tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
StackGuardian/tirith#405 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
good first issue hacktoberfest tests
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
StackGuardian/tirith#403 ·
Los mantenedores suelen responder en 1 día
-
research
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
StackGuardian/tirith#356 ·
Los mantenedores suelen responder en 1 día
Todos los issues de StackGuardian/tirith
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
UKGovernmentBEIS/control-arena#917 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
debpalash/VoiceStudio#2937 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aws-samples/sample-per-model-bedrock#261 ·
Los mantenedores suelen responder en 1 día