Logging into a locally started instance clears its container reference, causing stop to do nothing
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 79/100
Línea de trabajo
Empieza con cmd/login.go, donde el issue señala que login reemplaza el contexto guardado, y sigue cómo se escribe ese contexto. Reproduce el problema con los tres comandos del issue usando un archivo de configuración separado y luego comprueba que login conserva el campo de instancia y que microcks stop detiene el contenedor después.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
After starting a local Microcks instance with the CLI, logging into the same server clears the instance reference from its saved context.
A subsequent microcks stop reports that no instance is associated with the context and exits successfully, even though the container is still running.
I reproduced this using a separate config file and an authentication-disabled Microcks instance.
Expected behavior
Logging into the same server should preserve its existing local instance reference. Running microcks stop afterward should stop the container created by microcks start.
Actual behavior
Before login, the saved context contains:
instance: microcks-login-repro
After login, it becomes:
instance: ""
Running stop then prints: No instance is associated with this context
The command exits with code 0, but Docker still reports the container as running. The Microcks API also continues to return HTTP 200.
How to Reproduce?
With Docker running, execute the following commands using a separate config file:
microcks start --name microcks-login-repro --port 18585 --rm --ready-timeout 120s --config repro-config.yaml
microcks login http://localhost:18585 --config repro-config.yaml
microcks stop --config repro-config.yaml
Check whether the container is still running:
docker inspect --format '{{.State.Running}}' microcks-login-repro
The output is: true
You can also compare repro-config.yaml before and after login to see that the context’s instance field has been cleared.
As a control, restoring the config saved before login and repeating the same stop command successfully stopped and removed the container.
To clean up manually after reproducing:
docker stop microcks-login-repro
Microcks version or git rev
36f1028f877a5f4502633f574aac627e7d25dc53
Install method (docker-compose, helm chart, operator, docker-desktop extension,...)
No response
Additional information
The likely cause is in cmd/login.go: login replaces the existing context with a ContextRef containing only Name, Server, and User, leaving out the Instance field previously saved by start.
- Lenguaje dominante
- Go
- Estrellas
- 59
- Forks
- 75
- Merge medio
- 4 d 5 h
- PR fusionados (30 d)
- 15
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 microcks/microcks-cli
-
WatchConfig.UpsertEntry silently deletes existing contexts when re-upserting a watched filePosiblemente ocupada @aryarathoree la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
microcks/microcks-cli#610 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug: microcks test get swallows test failure details and operation results in text output modeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
microcks/microcks-cli#608 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
KeycloakClient strips realm path when realm URL lacks trailing slashPosiblemente ocupada @aryarathoree la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
microcks/microcks-cli#606 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Windows test failures in MockFileSystem.Walk due to path separatorPosiblemente ocupada @dipak0000812 la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
microcks/microcks-cli#601 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Bug: `testEndpoint` URL Scheme Not ValidatedPosiblemente ocupada @aniket866 la tomó hace 5 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
microcks/microcks-cli#598 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de microcks/microcks-cli
Issues similares
-
agent-butler-finding bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
jordansmall/spindrift#6414 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Icinga/icinga-kubernetes#294 ·
Los mantenedores suelen responder en 4 días
-
Cluster details: the Control Plane version field has a different border color than its icon boxAbiertokind/design sig/ui
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
kubermatic/dashboard#8449 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
cli/cli#14962 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Model conformance driftAbiertomodel-drift
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día