Skip to content

Fix: import command to honor --microcksURL without login - #510

Open
Syedowais312 wants to merge 1 commit into
microcks:masterfrom
Syedowais312:fix/import-microcksurl-without-login
Open

Fix: import command to honor --microcksURL without login#510
Syedowais312 wants to merge 1 commit into
microcks:masterfrom
Syedowais312:fix/import-microcksurl-without-login

Conversation

@Syedowais312

@Syedowais312 Syedowais312 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

This updates microcks import to use the shared command client setup already used by import-dir, service, and test.

Previously, microcks import --microcksURL ... still required local config/login unless Keycloak client credentials were also provided. This was inconsistent with import-dir and broke local latest-native usage where Keycloak is disabled.

Changes

  • Reuse newCommandClient(globalClientOpts) in the import command.
  • Preserve --watch context selection by falling back to the current config context, then the provided server URL.
  • Add a regression test verifying import --microcksURL --config <empty> reaches the artifact upload endpoint.

Verification

go test ./cmd
go test ./...

fix: #511

Signed-off-by: syedowais312 <syedowais312sf@gmail.com>
@Syedowais312
Syedowais312 force-pushed the fix/import-microcksurl-without-login branch from 12cb5c0 to 88f6616 Compare August 27, 2026 14:53
@Syedowais312

Copy link
Copy Markdown
Contributor Author

cc: @Vaishnav88sk @Harsh4902 @lbroudoux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import command requires login even when --microcksURL is provided

1 participant