Skip to content

UNOMI-880 UNOMI-878 UNOMI-139: Karaf dev shell commands#763

Open
sergehuber wants to merge 1 commit into
UNOMI-904-v2-api-compatibilityfrom
UNOMI-880-878-shell-dev-commands
Open

UNOMI-880 UNOMI-878 UNOMI-139: Karaf dev shell commands#763
sergehuber wants to merge 1 commit into
UNOMI-904-v2-api-compatibilityfrom
UNOMI-880-878-shell-dev-commands

Conversation

@sergehuber
Copy link
Copy Markdown
Contributor

Stacked PR (merge order)

Role Branch
Base (merge into) UNOMI-904-v2-api-compatibility (#762)
Head (this PR) UNOMI-880-878-shell-dev-commands

Merge #762 (and its base #760) before this PR.


JIRA

  • UNOMI-880 — Unified multi-tenant caching (operational shell)
  • UNOMI-878 — Cluster-aware task scheduling (operational shell)
  • UNOMI-139 — Multi-tenancy (tenant / API key shell)

Summary

Adds Karaf developer shell commands in tools/shell-dev-commands/ so operators and developers can manage caches, scheduled tasks, tenants, API keys, and JSON schemas from the console. This PR delivers the shell UX and integration tests; platform services (caching core, SchedulerService, tenant APIs) are on #760.

UNOMI-880 — Cache management (unomi:cache)

CacheCommands exposes tenant-aware cache operations aligned with MultiTypeCacheService:

  • --stats, --reset, --type, --tenant
  • --clear, --inspect, --watch, --view, --remove

IT: CacheCommandsIT

UNOMI-878 — Scheduler task shell

Commands on top of the cluster-aware SchedulerService from the platform PR:

Command Purpose
unomi:task-list List tasks (status, persistence, next/last run)
unomi:task-show Task details
unomi:task-cancel Cancel a task
unomi:task-retry Retry a failed task
unomi:task-purge Purge completed tasks
unomi:task-executor Show/change executor participation for this node

IT: SchedulerCommandsIT (shell commands; platform scheduler REST coverage is separate)

UNOMI-139 — Multi-tenant shell

  • TenantContextHelper — current tenant in the shell session
  • unomi:tenant-set / unomi:tenant-get — session tenant context
  • Tenant and API key CRUD commands (tenants/*, apikeys/*)
  • TenantCompleter for tab completion

IT: TenantCommandsIT

JSON Schema shell

  • New module extensions/json-schema/shell-commands/ with SchemaCrudCommand
  • Wired into Karaf unomi-shell-dev-commands feature and BOM (unomi-json-schema-shell-commands)

Other shell ITs

  • CrudCommandsIT — exercises unomi:crud from #755 (UNOMI-879) in the dev shell context
  • RuleStatisticsCommandsIT, TailCommandsIT, OtherCommandsIT
  • Shared harness: ShellCommandsBaseIT

AllITs registers the seven shell IT classes for this phase.

Packaging

  • extensions/json-schema/pom.xml — adds shell-commands module
  • kar/src/main/feature/feature.xml — bundles json-schema shell commands with dev shell feature
  • kar/pom.xml, bom/artifacts/pom.xml — dependency pins

Legacy placeholder commands under org.apache.unomi.shell.commands (ProfileRemove, RuleView, SessionView, RuleRemove) are removed; scheduler/tenant commands live under org.apache.unomi.shell.dev.commands.

Out of scope (other PRs)

Area Where
SchedulerService implementation, REST /cxs/tasks, consumer wiring #760
unomi:crud unified CRUD shell #755 (UNOMI-879)
tools/shell-commands/ migration (unomi:migrate) #760
V2 API compatibility mode #762
Platform ITs (TenantIT, SchedulerIT, …) Follow-up PR on this stack

Tests

  • Shell IT suite registered in AllITs (Pax Exam / Karaf, same harness as other integration tests)
  • Local: full integration test run green with OpenSearch

Licence

Add cache, scheduler, tenant/api-key, and json-schema CRUD dev shell
commands with integration tests. Wire unomi-json-schema-shell-commands
into Karaf feature and BOM.
@sergehuber sergehuber marked this pull request as ready for review May 19, 2026 13:41
@sergehuber sergehuber requested a review from Copilot May 19, 2026 13:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants