sergehuber opened a new pull request, #763: URL: https://github.com/apache/unomi/pull/763
### Stacked PR (merge order) | Role | Branch | |------|--------| | **Base (merge into)** | `UNOMI-904-v2-api-compatibility` ([#762](https://github.com/apache/unomi/pull/762)) | | **Head (this PR)** | `UNOMI-880-878-shell-dev-commands` | Merge [#762](https://github.com/apache/unomi/pull/762) (and its base [#760](https://github.com/apache/unomi/pull/760)) before this PR. --- **JIRA** - [UNOMI-880](https://issues.apache.org/jira/browse/UNOMI-880) — Unified multi-tenant caching (operational shell) - [UNOMI-878](https://issues.apache.org/jira/browse/UNOMI-878) — Cluster-aware task scheduling (operational shell) - [UNOMI-139](https://issues.apache.org/jira/browse/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](https://github.com/apache/unomi/pull/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](https://github.com/apache/unomi/pull/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](https://github.com/apache/unomi/pull/760) | | `unomi:crud` unified CRUD shell | [#755](https://github.com/apache/unomi/pull/755) (UNOMI-879) | | `tools/shell-commands/` migration (`unomi:migrate`) | [#760](https://github.com/apache/unomi/pull/760) | | V2 API compatibility mode | [#762](https://github.com/apache/unomi/pull/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 - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
