8000 feat(tools): make simple_job verification exhaustive with full protobuf resource and priority assertions by janzak-dev · Pull Request #908 · google/xmc · GitHub
[go: up one dir, main page]

Skip to content

feat(tools): make simple_job verification exhaustive with full protobuf resource and priority assertions - #908

Merged
janzak-dev merged 5 commits into
mainfrom
feat/exhaustive-simple-job-verify
Sep 17, 2026
Merged

janzak-dev merged 5 commits into
mainfrom
feat/exhaustive-simple-job-verify

Conversation

@janzak-dev
@janzak-dev janzak-dev commented Sep 17, 2026 •
Copy link
Copy Markdown
Collaborator

🥞 Stack Navigation

  • #908 Layer 1 (Base): feat(tools): make simple_job verification exhaustive with full protobuf resource and priority assertions 👈
  • #909 Layer 2: feat(ci): add unified nightly examples e2e pipeline workflow
  • #910 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 1 (Exhaustive simple_job Protobuf Verification & Foundation) 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 1 Role: Upgrades simple_job_verify.py and xmc_entities_validator.py with 100% full protobuf spec assertions (Priority HIGH, cpu-queue, worker naming demo-worker-1..3, replicas 1, CPU 500m, memory 512 MiB, tags, notes, completed state) and hermetic unit tests.

Run

https://github.com/google/xmc/actions/runs/35218884252/job/105194293789


Summary

Implements exhaustive protobuf assertions for the simple_job verification CLI (tools/nightly_tests/simple_job_verify.py), decomposing validation helpers in xmc_entities_validator.py with strict <= 25 line limits and adding unit tests.

Motivation & Context

  • Full Spec Verification: Ensures the simple_job verification script asserts not just that the WorkUnit completed, but that all specification parameters (Priority HIGH, cpu-queue, worker naming demo-worker-1..3, replicas 1, CPU 500m, memory 512 MiB, tags, and notes) strictly match expectations.
  • Decomposed Validator Architecture: Modularizes entity validation functions in xmc_entities_validator.py (validate_jobset_topology, validate_resource_requests, validate_work_unit_priority, validate_work_units, wait_for_experiment_state) to maintain high maintainability and testability.

Key Changes

  • Verification Engine (tools/nightly_tests/simple_job_verify.py):
    • Adds 100% full protobuf spec assertions for WorkUnit Priority (HIGH), scheduling queue (cpu-queue), worker naming (demo-worker-1..3), replicas (1), CPU requests (500m), memory requests (512 MiB), tags, and notes.
  • Entity Validator (tools/nightly_tests/xmc_entities_validator.py):
    • Adds decomposed validation functions for WorkUnit priority, resource requests, JobSet specifications, and polling loops (all <= 25 lines).
  • Hermetic Tests & Build (tools/nightly_tests/):
    • xmc_entities_validator_test.py: Adds comprehensive unit tests covering priority, resource requests, metadata, and JobSet validation.
    • common.py: Adds common flag definitions for CLI runners (expected_queue, timeout_sec, expected_work_units, expected_title_pattern).
    • BUILD.bazel: Registers test targets.

Assumptions

None — requirements were fully specified.

Verification & Testing

  • Bazel Unit Tests: bazel test //tools/nightly_tests:all (2/2 test targets passed)
  • Pre-commit Checks: ./.githooks/pre-commit check (100% clean)

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

…uf resource and priority assertions

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 refactors and modularizes the XMC nightly test validation framework. It updates simple_job_verify.py to support customizable multi-unit job verification and introduces several new validation helpers in xmc_entities_validator.py for priority, resource requests, metadata, and jobsets, along with corresponding unit tests. Feedback is provided to add an explicit assertion in _assert_all_work_unit_specs to ensure the number of retrieved raw work units matches the expected count, preventing silent failures.

@janzak-dev
janzak-dev marked this pull request as ready for review September 17, 2026 12:22
andrzejfudro
andrzejfudro previously approved these changes Sep 17, 2026
Comment thread tools/nightly_tests/common.py Resolved
@janzak-dev
janzak-dev added this pull request to the merge queue Sep 17, 2026
Merged via the queue into main with commit 03471de Sep 17, 2026
14 checks passed
@janzak-dev
janzak-dev deleted the feat/exhaustive-simple-job-verify branch September 17, 2026 14:02

This branch was previously deployed

1 inactive deployment
xmc-nightly — 72c069b6 Deployed Sep 17, 2026 by janzak-dev via 2. Validate Experiment & WorkUnits via SDK #18
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

0