Skip to content

Update JobSet dependency and implement support for SuccessPolicy - #423

Merged
dgrove-oss merged 2 commits into
project-codeflare:mainfrom
dgrove-oss:jobset-refresh
Sep 12, 2026
Merged

dgrove-oss merged 2 commits into
project-codeflare:mainfrom
dgrove-oss:jobset-refresh

Conversation

@dgrove-oss

Copy link
Copy Markdown
Collaborator

Summary

  • Bumps sigs.k8s.io/jobset to v0.12.0 (dependency and e2e test manifests). The v1alpha2 API used by AppWrapper is unchanged across v0.8.0 -> v0.12.0, so no source changes were required beyond the version bump.
  • Updates AppWrapper's component status reconciliation to recognize JobSet's own Completed/Failed status conditions, so SuccessPolicy/FailurePolicy outcomes are honored even when they don't align with a simple pod-phase count.

Motivation

AppWrapper previously inferred a wrapped JobSet's success or failure purely from counting pod phases. This works for the default SuccessPolicy (Operator: All), but breaks for a JobSet using Operator: Any: JobSet's own controller can mark the JobSet Completed once any one replicated job succeeds, while pods belonging to other, unused replicated jobs never reach the Succeeded phase. AppWrapper's pod-count check then never fires, and the AppWrapper drifts toward Resetting instead of Succeeded.

Addresses kubernetes-sigs/kueue#12389 (comment)

Changes

  • go.mod / go.sum: sigs.k8s.io/jobset v0.8.0 -> v0.12.0 (via go get + go mod tidy).
  • hack/e2e-util.sh: pin JobSet e2e test version/image to v0.12.0.
  • internal/controller/appwrapper/appwrapper_controller.go:
    • Added a succeeded field to componentStatusSummary.
    • getComponentStatus now has a dedicated case for jobset.x-k8s.io/v1alpha2:JobSet that inspects the JobSet's status.conditions for Completed/Failed (status True) and increments summary.succeeded/summary.failed accordingly.
    • The "Handle Success" logic in the Running phase now also treats compStatus.succeeded > 0 as an authoritative success signal, in addition to the existing pod-count check.
  • Test coverage (internal/controller/appwrapper/*_test.go, suite_test.go):
    • Registers the JobSet CRD (resolved from the sigs.k8s.io/jobset module cache) in the envtest environment.
    • Adds a jobSet() fixture and a setJobSetCondition helper to simulate the JobSet controller setting Completed/Failed conditions.
    • Adds two new test cases: a JobSet satisfying SuccessPolicy (with no pods ever created) drives the AppWrapper to Succeeded, and a JobSet reporting Failed drives the AppWrapper to Failed.

Test plan

  • make test — all specs pass (14 appwrapper controller specs including the 2 new JobSet cases, 20 webhook specs, 2 config specs).
  • go vet ./... — clean.
  • go build ./... — clean.

dgrove-oss and others added 2 commits September 12, 2026 17:42
Updates the JobSet dependency and e2e test manifests to the latest
release. The v1alpha2 API used by AppWrapper is unchanged across
v0.8.0 -> v0.12.0, so no source changes are required.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… status

Previously, AppWrapper only inferred component success or failure from
raw pod-phase counts. This misses JobSets using a non-"All" SuccessPolicy
(e.g. Operator: Any), where JobSet's own controller marks the JobSet
Completed even though pods in unused replicated jobs never reach the
Succeeded phase - causing AppWrapper to never observe success and drift
toward Resetting instead.

getComponentStatus now inspects a JobSet's own Completed/Failed status
conditions, and a component-level succeeded signal is treated as
authoritative alongside the existing pod-count check.

Addresses kubernetes-sigs/kueue#12389 (comment)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dgrove-oss
dgrove-oss merged commit c841d1e into project-codeflare:main Sep 12, 2026
3 checks passed
@dgrove-oss dgrove-oss added the enhancement New feature or request label Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant