microcks / microcks/microcks-cli

import command requires login even when --microcksURL is provided

オープン 初心者向け
#511 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Go
スター
52
フォーク
68
平均マージ
6時間 54分
マージ済み PR(30日)
10

説明

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
Image
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

cmd/import.go から始め、クライアントのセットアップを import-dir による newCommandClient(globalClientOpts) の使用と比較します。--microcksURL と空の設定パスを使ってローカルサーバーに対してコマンドを再現します。完了条件は、保存済みのログインを要求せずに指定された URL が使用され、認証が必要なサーバーでは認証エラーまたは API エラーが返されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go
領域
cli
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
84/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。