Repository navigation
feat(ci,tools): add unified nightly examples e2e pipeline with simple_job baseline - #905
janzak-dev wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request enhances the nightly examples test suite and verification scripts. Key changes include adding support for E2E results aggregation in GitHub Actions scripts, refactoring the simple_job_verify.py script to comprehensively validate Protobuf specifications and resource requests, and introducing robust validation utilities in xmc_entities_validator.py for priority, metadata, and JobSet topologies. Additionally, new unit tests were added across the codebase. Feedback on the changes includes simplifying a redundant status check condition in the aggregation script and using strict=True in a zip call where sequence lengths are already asserted to be equal.
| if (r && (r.status === 'FAILED' || r.status === 'VERIFY_FAILED' || (r.status !== 'PASSED' && r.status !== 'SKIPPED'))) { | ||
| allPassed = false; | ||
| } |
There was a problem hiding this comment.
The condition r.status === 'FAILED' || r.status === 'VERIFY_FAILED' || (r.status !== 'PASSED' && r.status !== 'SKIPPED') contains redundant checks. Since any status that is not 'PASSED' and not 'SKIPPED' (including 'FAILED' and 'VERIFY_FAILED') will satisfy the third condition, the entire expression can be simplified to just r.status !== 'PASSED' && r.status !== 'SKIPPED'.
| if (r && (r.status === 'FAILED' || r.status === 'VERIFY_FAILED' || (r.status !== 'PASSED' && r.status !== 'SKIPPED'))) { | |
| allPassed = false; | |
| } | |
| if (r && r.status !== 'PASSED' && r.status !== 'SKIPPED') { | |
| allPassed = false; | |
| } |
| f"Job '{job_name}' {item_type} container count mismatch: " | ||
| f"expected {len(expected_items)}, found {len(actual_items)}." | ||
| ) | ||
| for exp_c, act_c in zip(expected_items, actual_items, strict=False): |
There was a problem hiding this comment.
Since the lengths of actual_items and expected_items are already asserted to be equal on line 353, passing strict=False to zip is contradictory. It is more idiomatic and safer to use strict=True (or omit the parameter entirely) to align with the expectation that both sequences have the same length.
| for exp_c, act_c in zip(expected_items, actual_items, strict=False): | |
| for exp_c, act_c in zip(expected_items, actual_items, strict=True): |
…uf resource and priority assertions TAG=agy CONV=606f1e41-6785-4137-b85b-cd0f56237339
TAG=agy CONV=606f1e41-6785-4137-b85b-cd0f56237339
a8a359e to
54aa94b
Compare
|
Closing in favor of restructured 3-PR stack: Layer 1 (Exhaustive simple_job verification), Layer 2 (Nightly pipeline base), and Layer 3 (All 12 workloads suite). |
🥞 Stack Navigation
refactor(tools,ci): rename demo_workload_verify to simple_job_verify(Merged tomain✅)feat(ci,tools): add unified nightly examples e2e pipeline with simple_job baseline👈feat(ci,tools): expand nightly examples suite to all 12 example workloads🏛️ Role in PR Stack Architecture
This PR serves as Layer 2 (Unified Pipeline Foundation & Baseline Workload) within the nightly examples testing stack.
xmc-nightly..github/workflows/nightly-examples-e2e.ymlas a single, unified matrix workflow (following PR refactor(ci): consolidate demo workload launch and verification into unified nightly workflow #895's streamlined model) and configures thesimple_jobbaseline test case with 100% full Protobuf spec assertions. This allows Layer 3 to focus solely on expanding the matrix to the remaining 11 workloads.Summary
Adds the unified nightly examples E2E validation pipeline foundation (
.github/workflows/nightly-examples-e2e.yml) and baseline multi-unit job validator (tools/nightly_tests/simple_job_verify.py).Motivation & Context
simple_jobkeeps the initial PR small (<250 prod lines) and provides a clean, extensible pattern for subsequent example additions.Key Changes
.github/workflows/nightly-examples-e2e.yml):run-and-verify-examplesconfigured forworkflow_dispatchand nightly cron schedule.simple_jobbaseline executing via virtualenvpython3 -m <verify_module>.tools/nightly_tests/):simple_job_verify.py: 100% Protobuf spec assertions forsimple_job(verifies PriorityHIGH,cpu-queue, worker namingdemo-worker-1..3, replicas 1, CPU 500m, memory 512 MiB, tags, notes, completed status).xmc_entities_validator.py: Decomposed foundational gRPC validator utilities (all functions <= 25 lines).BUILD.bazel: Adds Bazelpy_binaryandpy_testtargets forsimple_job_verifyand common dependencies.common_test.py&xmc_entities_validator_test.py: Hermetic unit tests for common CLI helpers and reusable validator logic..github/scripts/aggregate-example-results.js):Assumptions
None — requirements were fully specified.
Verification & Testing
bazel test //tools/nightly_tests:all(2/2 test targets passed)node --test .github/scripts/aggregate-example-results.test.js(11/11 tests passing)./.githooks/pre-commit check(100% clean)TAG=agy
CONV=606f1e41-6785-4137-b85b-cd0f56237339