Repository navigation
Dipowell/crud jobs v2 - #1202
Merged
Merged
Conversation
Add job.yml template for CRUD benchmarking using nginx config test command (nginx -t) which completes quickly for benchmarking purposes.
- Add job to WORKLOAD_CONFIG with run-to-completion settings - Add create_job method using unified _create_workloads helper - Jobs use completions (not replicas) and skip pod readiness check
- Add job/jobs to valid_conditions with complete/failed states - Add _check_job_condition for job status polling - Add _is_job_condition_met to verify job completion/failure
- Add job handler to handle_workload_operations - Add job subparser with --completions argument - Jobs use --completions instead of --replicas
- Add job execution step to execute.yml (Azure-only) - Add completions variable to GPU benchmark matrix
- test_create_job_success - test_create_job_failure - test_create_job_no_client - test_create_job_partial_success
Diamond (diamondpowell)
marked this pull request as ready for review
May 28, 2026 16:06
Diamond (diamondpowell)
requested review from
Alyssa Vu (alyssa1303),
Anson Qian (anson627) and
Sumanth Reddy CH (sumanthreddy29)
as code owners
May 28, 2026 16:06
Diamond (diamondpowell)
requested review from
Liyu Ma (liyu-ma),
Vittoria (vittoriasalim),
Lei Yao (wonderyl) and
xinWeiWei24
as code owners
May 28, 2026 16:06
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Kubernetes Job workload support to the CRUD benchmarking framework alongside existing Deployment and StatefulSet workload paths.
Changes:
- Adds a Job manifest template and Azure
create_job()workload wiring. - Extends CLI, pipeline, and CRUD execution YAML to run Job workload operations.
- Adds Kubernetes client condition polling support for Job resources and related tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
modules/python/crud/workload_templates/job.yml |
Adds the Kubernetes Job workload template. |
modules/python/crud/azure/node_pool_crud.py |
Registers Job workload config and adds create_job(). |
modules/python/crud/main.py |
Adds Job CLI command and workload routing. |
modules/python/clients/kubernetes_client.py |
Adds Job condition polling and manifest apply/update/delete support. |
modules/python/tests/crud/test_azure_node_pool_crud.py |
Adds Azure CRUD Job creation tests. |
modules/python/tests/clients/test_kubernetes_client.py |
Adds Job condition polling tests. |
steps/engine/crud/k8s/execute.yml |
Adds Azure Job execution step. |
pipelines/perf-eval/GPU Benchmark/k8s-gpu-cluster-crud.yml |
Adds Job completions matrix values. |
…lure check - Add delete-before-create for jobs in node_pool_crud.py to handle completed job reuse when retrying benchmarks - Remove status.failed > 0 fallback in _is_job_condition_met to avoid premature failure detection while jobs may still be retrying
Diamond (diamondpowell)
force-pushed
the
dipowell/crud-jobs-v2
branch
3 times, most recently
from
May 28, 2026 16:36
27f1e1e to
48c6e66
Compare
xinWeiWei24
reviewed
May 29, 2026
xinWeiWei24
reviewed
May 29, 2026
Remove duplicate argument definitions from job_parser by inheriting from workload_common_parser, matching the pattern used by deployment and statefulset subcommands. The job parser now inherits --replicas from workload_common_parser which jobs don't use, but this is harmless - the argument is simply ignored in the job handler.
…nd wait_for_condition Refactor wait_for_job_completed to call _is_job_condition_met so both code paths share the same condition-checking logic. This also fixes the status.failed > 0 bug (now properly checks job conditions instead of counters).
Update test mocks to include spec.completions and proper Failed condition objects, matching the new _is_job_condition_met helper behavior.
Diamond (diamondpowell)
force-pushed
the
dipowell/crud-jobs-v2
branch
4 times, most recently
from
June 1, 2026 23:37
a03ffc0 to
119d8c4
Compare
…tions The debug logs said 'waiting...' but these functions don't wait - they return False and let the caller's loop handle the retry. Removes logs from _check_deployment_condition, _check_statefulset_condition, and _check_job_condition for consistency.
Diamond (diamondpowell)
requested a review
from Leonard Du (LeonardCareer)
as a code owner
June 2, 2026 05:16
Liyu Ma (liyu-ma)
approved these changes
Jun 2, 2026
Pablo Trivino (PabloTriv)
pushed a commit
that referenced
this pull request
Jun 12, 2026
Add Job workload support to CRUD benchmarking framework ## Summary Adds Job workload support to the CRUD benchmarking framework - the third and final of three planned workload methods (`deployment`, `statefulset`, `job`). Measures K8s Job create/verify latency on AKS node pools. ## Changes `modules/python/crud/workload_templates/job.yml` - New K8s Job manifest template using nginx config validation for quick completion - Uses `JOB_COMPLETIONS` placeholder, configurable node affinity via label_selector `modules/python/crud/azure/node_pool_crud.py` - Add `job` entry to `WORKLOAD_CONFIG` with template path, completions key, `complete` condition, and `verify_pods_ready=False` (jobs terminate after completion) - Add `create_job()` using unified `_create_workloads` helper `modules/python/crud/main.py` - Add `job` subparser with `--completions` argument (distinct from `--replicas`) - Add `elif command == "job"` routing in `handle_workload_operations` `modules/python/clients/kubernetes_client.py` - Add `job`/`jobs` to `valid_conditions` with `['complete', 'failed']` - Add `_check_job_condition` and `_is_job_condition_met` for job status polling - Extend `wait_for_condition` to support Job resource type `steps/engine/crud/k8s/execute.yml` - Add `job` script block (Azure-only, consistent with deployment/statefulset) `pipelines/perf-eval/GPU Benchmark/k8s-gpu-cluster-crud.yml` - Add `completions: 1` to matrix entries ## Tests `test_azure_node_pool_crud.py`: - `test_create_job_success` - happy path - `test_create_job_failure` - all fail to complete - `test_create_job_no_client` - returns early when k8s client unavailable - `test_create_job_partial_success` - continues on failures, returns False `test_kubernetes_client.py`: - `test_wait_for_condition_job_complete_success` - `test_wait_for_condition_job_failed` - `test_wait_for_condition_job_timeout` - `test_wait_for_condition_job_not_found`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Job workload support to CRUD benchmarking framework
Summary
Adds Job workload support to the CRUD benchmarking framework - the third and final of three planned workload methods (
deployment,statefulset,job). Measures K8s Job create/verify latency on AKS node pools.Changes
modules/python/crud/workload_templates/job.ymlJOB_COMPLETIONSplaceholder, configurable node affinity via label_selectormodules/python/crud/azure/node_pool_crud.pyjobentry toWORKLOAD_CONFIGwith template path, completions key,completecondition, andverify_pods_ready=False(jobs terminate after completion)create_job()using unified_create_workloadshelpermodules/python/crud/main.pyjobsubparser with--completionsargument (distinct from--replicas)elif command == "job"routing inhandle_workload_operationsmodules/python/clients/kubernetes_client.pyjob/jobstovalid_conditionswith['complete', 'failed']_check_job_conditionand_is_job_condition_metfor job status pollingwait_for_conditionto support Job resource typesteps/engine/crud/k8s/execute.ymljobscript block (Azure-only, consistent with deployment/statefulset)pipelines/perf-eval/GPU Benchmark/k8s-gpu-cluster-crud.ymlcompletions: 1to matrix entriesTests
test_azure_node_pool_crud.py:test_create_job_success- happy pathtest_create_job_failure- all fail to completetest_create_job_no_client- returns early when k8s client unavailabletest_create_job_partial_success- continues on failures, returns Falsetest_kubernetes_client.py:test_wait_for_condition_job_complete_successtest_wait_for_condition_job_failedtest_wait_for_condition_job_timeouttest_wait_for_condition_job_not_found