Logging into a locally started instance clears its container reference, causing stop to do nothing
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 79/100
Rechercherichtung
Beginne mit cmd/login.go, wo der Issue darauf hinweist, dass login den gespeicherten Kontext ersetzt, und verfolge, wie dieser Kontext geschrieben wird. Reproduziere das Problem mit den drei Befehlen aus dem Issue und einer separaten Konfigurationsdatei. Prüfe dann, ob login das Instanzfeld beibehält und ob microcks stop den Container anschließend anhält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Go
- Sterne
- 59
- Forks
- 75
- Ø Merge
- 4 T. 5 Std.
- Gemergte PRs (30 T.)
- 15
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microcks/microcks-cli
-
WatchConfig.UpsertEntry silently deletes existing contexts when re-upserting a watched fileEvtl. vergeben @aryarathoree hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
microcks/microcks-cli#610 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug: microcks test get swallows test failure details and operation results in text output modeOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
microcks/microcks-cli#608 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
KeycloakClient strips realm path when realm URL lacks trailing slashEvtl. vergeben @aryarathoree hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
microcks/microcks-cli#606 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Windows test failures in MockFileSystem.Walk due to path separatorEvtl. vergeben @dipak0000812 hat das vor 6 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
microcks/microcks-cli#601 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bug: `testEndpoint` URL Scheme Not ValidatedEvtl. vergeben @aniket866 hat das vor 6 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
microcks/microcks-cli#598 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microcks/microcks-cli
Ähnliche Issues
-
Query cache: a failed cache page read leaves the set request's read lock held, so the scan hangsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
turbot/steampipe-plugin-sdk#986 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
router-for-me/CLIProxyAPI#7307 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
betterleaks/betterleaks#460 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
openmcp-project/service-provider-crossplane#330 ·
Maintainer antworten meist innerhalb von 1 Tag