Skip to content

UNOMI-944: Add IT developer tooling for run archival, cross-run comparison and live Karaf inspection#770

Merged
sergehuber merged 3 commits into
masterfrom
UNOMI-944-it-dev-tooling
Jun 7, 2026
Merged

UNOMI-944: Add IT developer tooling for run archival, cross-run comparison and live Karaf inspection#770
sergehuber merged 3 commits into
masterfrom
UNOMI-944-it-dev-tooling

Conversation

@sergehuber
Copy link
Copy Markdown
Contributor

Summary

  • Adds archive-it-run.sh to capture IT run artifacts (Karaf logs, failsafe reports, engine config, build trace) before the next build wipes itests/target/
  • Adds compare-it-runs.sh to diff two or more captured runs and classify each test as consistently failing, consistently passing, or flaky
  • Adds kt.sh (backported from unomi-3-dev) for live Karaf inspection during a run: log, tail, grep, start, stop, debug
  • Adds a build trace to build.sh that records the exact Maven options, search engine, heap sizes, and flags for every IT run
  • Adds shared shell libraries (it-run-lib.sh, it-run-karaf-lib.sh, it-run-context-lib.sh, it-run-compare-lib.sh, it-run-bootstrap.sh, it-run-ui.sh) used by the above scripts
  • Updates itests/README.md with a full overview of how the IT suite works, how to write tests (BaseIT API, polling helpers, HTTP helpers, log checking), and documentation for all new tooling

Notes

Test plan

  • Run ./build.sh --integration-tests and verify itests/target/it-run-trace.properties is written
  • Run ./itests/archive-it-run.sh after a completed IT run and verify the archive is created under itests/archives/
  • Run ./itests/compare-it-runs.sh --last 2 with two captures and verify the comparison report
  • Run ./itests/kt.sh help and verify it locates the Karaf directory

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.

Pull request overview

This PR adds opt-in integration-test (IT) developer tooling under itests/ to (1) archive artifacts from a completed IT run, (2) compare multiple archived runs to spot flaky vs systematic failures, and (3) inspect the live Pax Exam/Karaf instance during a run. It also updates the IT documentation and records a build trace for reproducibility.

Changes:

  • Add archive-it-run.sh + shared libs to capture/triage Karaf logs, failsafe reports, engine logs, and run context into itests/archives/.
  • Add compare-it-runs.sh + comparison engine to classify tests across multiple captures (systematic/flaky/regression/fixed).
  • Add build.sh “IT run trace” output (itests/target/it-run-trace.properties) and expand itests/README.md documentation (plus new LLM analysis guide).

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
itests/README.md Major rewrite/expansion of IT overview, best practices, debugging, and new tooling docs
itests/llm-it-run-analysis-guide.md New guide explaining how to interpret archived artifacts/logs for analysis
itests/kt.sh New helper to locate and inspect the latest Pax Exam/Karaf instance/logs during a run
itests/it-run-ui.sh New UI/presentation helpers for archiver/comparator scripts
itests/it-run-lib.sh New shared library for run discovery, parsing, indexing, and fingerprinting
itests/it-run-karaf-lib.sh New Karaf log mining/triage implementation (rollover support, unexpected filtering, correlation)
itests/it-run-context-lib.sh New run-context/manifest generation and environment snapshot helpers
itests/it-run-compare-lib.sh New comparison/report engine for multi-run test outcome classification
itests/it-run-bootstrap.sh New bootstrap module that sources shared tooling and initializes environment
itests/compare-it-runs.sh New CLI entrypoint for comparing two+ archived runs
itests/archive-it-run.sh New CLI entrypoint for capturing/archiving an IT run and optionally auto-comparing recent runs
build.sh Adds IT run tracing file output for reproducibility (mvn options, heaps, engine, flags)
.gitignore Ignores itests/archives/ to keep captured artifacts out of git

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread build.sh Outdated
Comment thread itests/lib/it-run-ui.sh
Comment thread itests/lib/it-run-ui.sh
Comment thread itests/lib/it-run.sh
Comment thread itests/lib/it-run.sh
Comment thread itests/lib/it-run-karaf.sh
Comment thread itests/lib/it-run-context.sh
Comment thread itests/lib/it-run-compare.sh
Comment thread itests/it-run-bootstrap.sh Outdated
Comment thread itests/llm-it-run-analysis-guide.md
kt.sh was missing set -euo pipefail unlike the other entry-point scripts,
and the start/stop/console/debug arms used `if [ $? -eq 0 ]` which always
exits 0 even when find_karaf_exec fails. Replaced with `|| exit 1`.

In it-run-karaf.sh, karaf_line_is_actionable_trigger was spawning three
separate sed subshells for ANSI stripping — one per helper. Pre-strip once
and pass the result to all three. Also switched the exception-index triage
step to use run_karaf_triage_step consistently with the other two steps in
process_karaf_log_dir.
@sergehuber sergehuber merged commit 9b599ca into master Jun 7, 2026
6 checks passed
@sergehuber sergehuber deleted the UNOMI-944-it-dev-tooling branch June 7, 2026 19:34
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