Skip to content

Round-trip multi-role JobSets + k8s helper consolidation - #21

Merged
stackedsax merged 1 commit into
mainfrom
feat/roundtrip-and-tech-debt
Jul 18, 2026
Merged

Round-trip multi-role JobSets + k8s helper consolidation#21
stackedsax merged 1 commit into
mainfrom
feat/roundtrip-and-tech-debt

Conversation

@stackedsax

Copy link
Copy Markdown
Contributor

What

Multi-role jobs round-trip now, plus some k8s-helper consolidation.

JobSet round-trip

Kueue and YuniKorn emit multi-role jobs as a JobSet (one replicatedJob
per role), but the parsers only understood a single batch/v1 Job — so a
multi-role job could be emitted but never parsed back to SPLAT. Fixed:

  • internal/jobset.ToTasks inverts the emitters' replicatedJobs into SPLAT
    tasks — execution (including detecting an inlined /bin/bash -c script back
    to execution.script), resources, placement, and replicas — plus the shared
    job-level volumes and the max BackoffLimit.
  • The Kueue and YuniKorn parsers detect kind: JobSet and delegate. YuniKorn
    additionally recovers gang scheduling from the task-groups annotation
    (gang minAvailable = sum of the groups' minMember).

Tech debt (folded in)

  • Moved the duplicated tolerations helper (Volcano + Armada) and the Volcano
    parser's volume recovery into k8senc: Tolerations, VolumesFromPod,
    SortVolumes. Volcano and the JobSet parser now share one implementation.
  • The dry-run workflow now also triggers on internal/parser/** and
    internal/k8senc/** changes, not just emitters.

Testing

  • TestParse_JobSet (Kueue): a JobSet with a container role and an
    inlined-script role parses back to two tasks with correct replicas,
    resources, GPU, node selector, and script recovery.
  • TestParse_JobSet_Gang (YuniKorn): queue + two roles + gang recovered from
    the task-groups annotation.
  • TestRoundTrip_MultiRoleJobSet: SPLAT → Kueue JobSet → SPLAT preserves roles,
    replicas, images, and GPU — guards against emitter/parser drift.
  • Full suite, go vet, and gofmt all clean.

🤖 Generated with Claude Code

Kueue and YuniKorn emit multi-role jobs as a JobSet (one replicatedJob per
role), but the parsers only understood a single batch/v1 Job, so those jobs
could not round-trip back to SPLAT. Add JobSet parsing:

- internal/jobset.ToTasks inverts the emitters' replicatedJobs into SPLAT
  tasks (execution incl. inlined-script detection, resources, placement,
  replicas) plus shared job volumes and the max BackoffLimit.
- The Kueue and YuniKorn parsers detect kind: JobSet and delegate; YuniKorn
  additionally recovers gang scheduling from the task-groups annotation.

Tech debt folded in while here:
- Move the duplicated tolerations helper and the Volcano parser's volume
  recovery into k8senc (Tolerations, VolumesFromPod, SortVolumes); Volcano
  and the JobSet parser now share them.
- Trigger the dry-run workflow on parser/** and k8senc/** changes too, not
  just emitters.

Tests: JobSet parse for Kueue (container + inlined-script roles) and YuniKorn
(gang from task-groups), plus an emit->parse round-trip guarding against
emitter/parser drift.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PnTz6Zxqa4jHocK8kCbyx
@stackedsax
stackedsax merged commit cff4740 into main Jul 18, 2026
7 checks passed
@stackedsax
stackedsax deleted the feat/roundtrip-and-tech-debt branch July 18, 2026 20:01
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