microcks / microcks/microcks-cli
import command requires login even when --microcksURL is provided
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 52
- Fork
- 68
- Merge medio
- 6h 54m
- PR unite (30g)
- 10
Descrizione
Describe the bug
microcks import does not seem to handle --microcksURL the same way as import-dir.
I started a local Microcks instance using microcks start, which runs the latest-native image without Keycloak enabled. In this setup, importing through --microcksURL http://localhost:8585 should work without a saved login/config.
import-dir works correctly with an empty config path and imports the artifact successfully. But import with the same server URL and same empty config path fails with:
please login to perform this operation
This is confusing because the command already has the target server from --microcksURL.
Expected behavior
microcks import --microcksURL... should try to use the provided server directly, like --import-dir does. If the server requires authentication, then it
should fail with an auth/API error from the server.
The issue seems to be that cmd/import.go has its own client setup logic, while import-dir uses the shared newCommandClient(globalClientOpts) helper.
Repro
Microcks version or git rev
microcks-cli master branch
Install method (docker-compose, helm chart, operator, docker-desktop extension,...)
No response
Additional information
No response
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da cmd/import.go e confronta la configurazione del client con l'uso di newCommandClient(globalClientOpts) da parte di import-dir. Riproduci il comando contro un server locale usando --microcksURL e un percorso di configurazione vuoto; il lavoro è completato quando viene usato l'URL fornito senza richiedere un accesso salvato, mentre i server che richiedono l'autenticazione restituiscono il relativo errore di autenticazione o API.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- go
- Ambito
- cli
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 84/100