Skip to content

feat(ci,tools): add unified nightly examples e2e pipeline with simple_job baseline - #905

Closed
janzak-dev wants to merge 2 commits into
mainfrom
feat/nightly-examples-pipeline-base
Closed

janzak-dev wants to merge 2 commits into
mainfrom
feat/nightly-examples-pipeline-base

Conversation

@janzak-dev

@janzak-dev janzak-dev commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

🥞 Stack Navigation

  • #901 Layer 1 (Base): refactor(tools,ci): rename demo_workload_verify to simple_job_verify (Merged to main ✅)
  • #905 Layer 2: feat(ci,tools): add unified nightly examples e2e pipeline with simple_job baseline 👈
  • #906 Layer 3 (Apex): 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.

  • Stack Objective: Establish an automated, robust, end-to-end multi-example workload execution and validation framework running against xmc-nightly.
  • Layer 2 Role: Implements .github/workflows/nightly-examples-e2e.yml as 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 the simple_job baseline 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

  • Consolidated CI Runner Efficiency: Adopting the streamlined unified action pattern from PR refactor(ci): consolidate demo workload launch and verification into unified nightly workflow #895 eliminates redundant runner setup and executes workload submission and verification within a single matrix job.
  • Incremental Foundation: Introducing the nightly pipeline with only simple_job keeps the initial PR small (<250 prod lines) and provides a clean, extensible pattern for subsequent example additions.

Key Changes

  • CI / Workflow (.github/workflows/nightly-examples-e2e.yml):
    • Sets up single-action unified matrix job run-and-verify-examples configured for workflow_dispatch and nightly cron schedule.
    • Implements matrix runner with simple_job baseline executing via virtualenv python3 -m <verify_module>.
  • Validation Engine (tools/nightly_tests/):
    • simple_job_verify.py: 100% Protobuf spec assertions for simple_job (verifies Priority HIGH, cpu-queue, worker naming demo-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 Bazel py_binary and py_test targets for simple_job_verify and common dependencies.
    • common_test.py & xmc_entities_validator_test.py: Hermetic unit tests for common CLI helpers and reusable validator logic.
  • Results Aggregation (.github/scripts/aggregate-example-results.js):
    • Enhanced to auto-detect E2E test suite matrix outputs and generate formatted 6-column GitHub Step Summary table.

Assumptions

None — requirements were fully specified.

Verification & Testing

  • Bazel Unit Tests: bazel test //tools/nightly_tests:all (2/2 test targets passed)
  • Node Unit Tests: node --test .github/scripts/aggregate-example-results.test.js (11/11 tests passing)
  • Pre-commit Checks: ./.githooks/pre-commit check (100% clean)

TAG=agy
CONV=606f1e41-6785-4137-b85b-cd0f56237339

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +89 to 91
if (r && (r.status === 'FAILED' || r.status === 'VERIFY_FAILED' || (r.status !== 'PASSED' && r.status !== 'SKIPPED'))) {
allPassed = false;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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'.

Suggested change
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):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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.

Suggested change
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
@janzak-dev
janzak-dev force-pushed the feat/nightly-examples-pipeline-base branch from a8a359e to 54aa94b Compare September 17, 2026 11:27
@janzak-dev

Copy link
Copy Markdown
Collaborator Author

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).

@janzak-dev janzak-dev closed this Sep 17, 2026
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.

1 participant