Revert to execute-test / test_execution terminology (3.0) - #1100
Conversation
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 62d5ded. ⛔ Hard block: Issues at High severity or above will block this PR from merging.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
62d5ded to
f24e550
Compare
PR Reviewer Guide 🔍(Review updated until commit f69100c)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to f69100c
Previous suggestionsSuggestions up to commit f24e550
|
Reverts the 2.x-era terminology to the 3.0 vocabulary, with back-compat so existing automation and on-disk data keep working: CLI: - 'execute-test' subcommand with deprecated 'run'/'execute' aliases - '--test-execution-id' with legacy '--test-run-id' alias (both dispatch) Internal: - test_run/TestRun -> test_execution/TestExecution across metrics, aggregator, worker_coordinator, builder, paths, publisher, orchestrator (renamed the module test_run_orchestrator.py -> test_execution_orchestrator.py) - on-disk test-runs/ -> test-executions/; stored field test-run-id -> test-execution-id Back-compat (reads accept BOTH, writes emit new): - store readers and the CPU-window node-stats query match either test-execution-id or test-run-id - list accepts both 'test-executions' and legacy 'test-runs' No behavior change beyond naming. First of the stacked 3.0 PRs; multi-engine and the CloudWatch datastore build on this foundation. Tests: 1432 passed (engine/cloudwatch suites belong to their own PRs). Signed-off-by: Michael Oviedo <mikeovi@amazon.com>
…RSD) Found via live e2e: 'aggregate' of two normal index-only runs crashed with ValueError 'Cannot calculate RSD ... empty list of values'. Root cause was a collision between two prior changes: - the robustness fix pre-filtered None mean values at the call site, and - the opensearch-project#1096 merge made calculate_rsd tolerate None *inside* a list but still raise on a genuinely empty list. Together, an all-None metric (e.g. index-only throughput.mean) produced an empty list that hit the raise. Fix: - build_aggregated_results_dict passes raw v.get('mean') values (still avoids the original KeyError on a missing 'mean' key) and lets calculate_rsd handle None/empty. - calculate_rsd returns 'NA' for an empty/all-None list instead of raising, so one unmeasured metric no longer aborts the whole aggregation. Adds a regression test for empty/all-None/single-value RSD. Signed-off-by: Michael Oviedo <mikeovi@amazon.com>
The 3.0 terminology revert restores the 1.x execute-test/test_execution vocabulary so users can move from 1.x to 3.0 without issues. PR-1 already read 2.x artifacts back-compat; this closes the two remaining gaps for genuine 1.x artifacts: TestExecution.from_dict: accept the pre-2.x provision-config-* field names as fallbacks for the reverted cluster-config-* names. A 1.x record carries 'provision-config-instance' (not 'cluster-config-instance'); the hard key previously raised KeyError, which silently dropped 1.x runs on the file read path and crashed list() on the OpenSearch-datastore read path (both funnel through from_dict). Also recover provision-config-instance-params and cluster.provision-config-revision so no 1.x data is lost on read. FileTestExecutionStore: add a read-only glob for the 1.x on-disk layout (test_executions/ UNDERSCORE dir + test_execution.json) in list() and find_by_test_execution_id(). 1.x aggregated results already match the canonical aggregated_test_execution.json path, so list_aggregations is unchanged. Nothing writes to the underscore path. Reads only; no change to what 3.0 writes. Tests: 1435 passed (2 new). Signed-off-by: Michael Oviedo <mikeovi@amazon.com>
f24e550 to
f69100c
Compare
|
Persistent review updated to latest commit f69100c |
rishabh6788
left a comment
There was a problem hiding this comment.
LGTM, hold the merge for now.
Description
First of the stacked OpenSearch Benchmark 3.0 PRs. This reverts the 2.x-era terminology back to the 3.0 (and original 1.x) vocabulary, with full back-compat so existing automation and historical data keep working.
CLI
execute-testis the primary subcommand again;run/executeremain as deprecated aliases (they warn, then dispatch).--test-execution-idis primary;--test-run-idremains as a legacy alias.Internal rename
test_run/TestRun→test_execution/TestExecutionacross metrics, aggregator, worker_coordinator, builder, paths, publisher, and the orchestrator (moduletest_run_orchestrator.py→test_execution_orchestrator.py).test-runs/→test-executions/;test_run.json→test_execution.json.benchmark-test-runs-*→benchmark-test-executions-*; stored fieldtest-run-id→test-execution-id.Back-compat — reads accept BOTH, writes emit the new vocabulary
TestExecution.from_dictaccepts eithertest-execution-id/test-run-idandtest-execution-timestamp/test-run-timestamp.listaccept both old and new names.provision-config-instance(+-params, +cluster.provision-config-revision) field names as fallbacks for the revertedcluster-config-*names, and the 1.x on-disktest_executions/(underscore) directory layout. Without this, a 1.x record silently dropped fromliston the file path and crashedliston the OpenSearch-datastore path (both funnel throughfrom_dict). Reads only — 3.0 always writes the new vocabulary.No behavior change beyond naming and widened back-compat reads. Multi-engine support and the CloudWatch datastore build on this foundation in subsequent stacked PRs.
Note for reviewers
version.txtis intentionally left at 2.4.0; the 3.0.0 bump lands in its own dedicated PR at release time (matching repo convention, e.g. Bump version to 2.4.0 #1090).aggregateuses--test-executions-id(plural) whileexecute-testuses--test-execution-id(singular); both have working legacy aliases. Can be smoothed here or left.Issues Resolved
Restores the original 1.x
execute-test/test_executionvocabulary that 2.x had renamed.Testing
New functionality includes testing
Unit: full suite passes (1435 passed / 5 skipped; engine + metrics_stores suites belong to later stacked PRs). Includes 13+ back-compat assertions exercising the legacy
test-run-idkey, plus two new tests for genuine 1.x artifacts (from_dictparsing theprovision-config-*vocab, and reading the 1.x underscore on-disk layout).Live e2e on real AWS infra (OpenSearch 2.19.1): full
execute-testwrite→read round-trip confirming the newtest-executions/dir,test_execution.json, andtest-execution-id/test-execution-timestampfields with no legacy keys emitted; OpenSearch-datastore path creatingbenchmark-{metrics,results,test-executions}-*indices with all metric docs queryable bytest-execution-id; read-both proven on a live index (synthetic legacytest-run-iddoc matched by the back-compat query);list/compare/aggregate/visualizeexercised via both new and legacy flags; a full (non-test-mode) benchmark producing real throughput/latency.1.x → 3.0 migration proven live: genuine 1.x artifacts produced by OpenSearch Benchmark 1.18.0 (on-disk
test_executions/underscore dir + a datastore run doc carryingprovision-config-instance) were read by this branch —list,find, andcompareall succeed on the on-disk run, and the datastorelistreads the 1.x doc without the previousfrom_dictcrash.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.