Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: Add microcks validate command for pre-flight config verification #470

Copy link
Copy link

Description

@kunal-yelgate
Issue body actions

Current Behavior

Users discover configuration problems only when running actual commands. Common issues include expired tokens, unreachable URLs, missing permissions, or incompatible TLS settings. There is no way to validate the entire setup before attempting imports or tests.

Why we need this?

  • Config errors surface mid-execution, wasting time and CI resources
  • New users struggle with silent misconfigurations
  • No pre-flight check exists for CI/CD pipelines

How will this help?

  • microcks validate catches issues before imports/tests run
  • Structured pass/fail output enables CI gating
  • Reduces onboarding friction for new users
  • Prevents failed CI runs due to expired tokens or wrong contexts

Proposed Solution

Add microcks validate command that performs:

  • Config file existence and permissions check
  • Current context validity verification
  • Server reachability (HTTP 200 response)
  • Keycloak token validity and expiration check
  • Service account permissions (manager/admin roles)
  • Async Minion connectivity status

Exit codes: 0 (all passed), 1 (one or more failed)

Example output:

$ microcks validate
✓ Config file exists at /home/user/.config/microcks/config
✓ Current context 'staging' is valid
✓ Microcks server at http://localhost:8585/api is reachable (HTTP 200)
✓ Keycloak authentication is enabled and token is valid
✓ Service Account has 'manager' role for imports
✓ Async Minion is connected

All checks passed — ready to import and test
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleState due to inactivityState due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.