Logging into a locally started instance clears its container reference, causing stop to do nothing
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 79/100
Direção de pesquisa
Comece por cmd/login.go, onde o issue aponta que login substitui o contexto salvo, e acompanhe como esse contexto é gravado. Reproduza o problema com os três comandos do issue usando um arquivo de configuração separado e, em seguida, verifique se login preserva o campo da instância e se microcks stop para o contêiner depois.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Go
- Estrelas
- 59
- Forks
- 75
- Merge médio
- 4d 5h
- PRs com merge (30d)
- 15
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microcks/microcks-cli
-
WatchConfig.UpsertEntry silently deletes existing contexts when re-upserting a watched fileTalvez já em andamento @aryarathoree assumiu há 2 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
microcks/microcks-cli#610 · 5 comentários ·
Mantenedores costumam responder em até 1 dia
-
bug: microcks test get swallows test failure details and operation results in text output modeAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
microcks/microcks-cli#608 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
KeycloakClient strips realm path when realm URL lacks trailing slashTalvez já em andamento @aryarathoree assumiu há 2 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
microcks/microcks-cli#606 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Windows test failures in MockFileSystem.Walk due to path separatorTalvez já em andamento @dipak0000812 assumiu há 6 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
microcks/microcks-cli#601 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Bug: `testEndpoint` URL Scheme Not ValidatedTalvez já em andamento @aniket866 assumiu há 6 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
microcks/microcks-cli#598 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de microcks/microcks-cli
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
adrianbrad/queue#92 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
agent-ready area:skills
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
jmbarzee/temporal-architect#444 ·
Mantenedores costumam responder em até 1 dia
-
enhancement needs:sonnet ready-for-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia