test(nvcf-cli): TestResolveStack_GitURI_DispatchesToGitResolver opens a real SSH connection and blocks go test on a host-key prompt
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 91/100
Línea de trabajo
Lee src/clis/nvcf-cli/internal/selfhosted/stack_test.go, especialmente TestResolveStack_GitURI_DispatchesToGitResolver, y comprueba cómo ResolveStack invoca el resolvedor de Git. Ejecuta la prueba específica con GIT_SSH_COMMAND=false, tal como se describe en el issue; la tarea estará terminada cuando la prueba verifique el envío al resolvedor sin abrir una conexión SSH real ni quedarse bloqueada ante una solicitud de confirmación de la clave del host.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
TestResolveStack_GitURI_DispatchesToGitResolver
(src/clis/nvcf-cli/internal/selfhosted/stack_test.go) calls ResolveStack with
[email protected]:nonexistent/nonexistent.git, so resolveGit runs a real
git clone over SSH to github.com.
The test's comment says "The point is to verify dispatch, not network
reachability," but the test depends on SSH and the network. On a machine where
github.com is not in known_hosts, SSH asks the host-key question on the terminal,
and go test ./... stops until someone answers:
The authenticity of host 'github.com (...)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
In CI there is no terminal, so SSH fails fast and the test passes, which hides this.
Steps to reproduce
- Fresh environment (I used a GitHub Codespace on main
31e209e64) with no
github.com entry in~/.ssh/known_hosts. cd src/clis/nvcf-cli && go test ./...- The run blocks on the host-key prompt in
internal/selfhosted.
Suggested fix
Keep the test off the network so it only verifies dispatch, for example:
t.Setenv("GIT_SSH_COMMAND", "false")
before calling ResolveStack. Git then fails immediately with no prompt, and the
existing assertions (an error containing "git ") still hold. Verified with
GIT_SSH_COMMAND=false go test ./internal/selfhosted/ -run TestResolveStack_GitURI_DispatchesToGitResolver -v.
Happy to send the PR.
- Lenguaje dominante
- Go
- Estrellas
- 251
- Forks
- 100
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- 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 NVIDIA/nvcf
-
documentation needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
nvca operator: an invalid NVCFWorkerDegradationPeriodMinutes value blocks all cluster configuration updatesPosiblemente ocupada @SelvanayakiGurusamy la tomó hace 2 días. Abiertocompute-stack
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
observability: make the collector replica count configurablePosiblemente ocupada @sunilthorat09 la tomó hace 2 días. Abiertoinfrastructure
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
documentation needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
documentation needs-triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
Todos los issues de NVIDIA/nvcf
Issues similares
-
area/import-export area/projects concern/ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
go-vikunja/vikunja#4455 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dependabot PRs no longer merge automaticallyPosiblemente ocupada @dwisiswant0 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
projectdiscovery/urlfinder#160 ·
Los mantenedores suelen responder en 1 día
-
database
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
chnm/legal-modernism#450 ·
Los mantenedores suelen responder en 1 día
-
tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Disable Dependabot for Go modules to eliminate redundant PRs superseded by MintMaker/RenovateAbiertobug ready-for-triage ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
RedHatInsights/insights-ingress-go#946 · 4 comentarios ·
Los mantenedores suelen responder en 1 día