• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubeflow / trainer / 25393884502
58%
master: 62%

Build:
Build:
LAST BUILD BRANCH: feat/automate-release
DEFAULT BRANCH: master
Ran 05 May 2026 06:15PM UTC
Jobs 1
Files 40
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 May 2026 06:11PM UTC coverage: 57.999% (-0.03%) from 58.025%
25393884502

push

github

web-flow
[release-2.2] fix(api): allow atomic RuntimePatches update on unsuspend (#3489)

* fix(webhook): allow atomic RuntimePatches update on unsuspend

Change checkRuntimePatchesImmutability to check the *old* TrainJob's
suspend state instead of the new one. This lets external controllers
(notably Kueue, see kubernetes-sigs/kueue#8296) modify spec.runtimePatches
and set spec.suspend=false in a single API request, eliminating the
two-step update workaround and the race window between the calls.

Mirrors the Kubernetes core Job validation pattern:
https://github.com/kubernetes/kubernetes/blob/86b66f6f333a/pkg/registry/batch/job/strategy.go#L191

The downstream JobSet activity check (no active replicatedJobs) still
runs, so updates while pods are running remain forbidden.

Refs: #3043
Signed-off-by: Sabari Narayana <sabarinarayanakg@proton.me>

* test(jobset): cover atomic suspend->unsuspend RuntimePatches update

Add a unit test that exercises the new atomic-update path: a single
TrainJob update that both clears spec.suspend and modifies
spec.runtimePatches must succeed when the previous state was suspended.

Refs: #3043
Signed-off-by: Sabari Narayana <sabarinarayanakg@proton.me>

* test(integration): cover atomic unsuspend + RuntimePatches update

Extend the trainjob webhook update table with an entry that creates a
suspended TrainJob with RuntimePatches and then, in a single Update,
both unsuspends it and modifies the runtimePatches NodeSelector. This
exercises the relaxed validation against a real apiserver and protects
the suspended -> unsuspended transition path used by Kueue.

Refs: #3043
Signed-off-by: Sabari Narayana <sabarinarayanakg@proton.me>

* fix(api): block RuntimePatches change only when both states are unsuspended

Per @mimowo's review, the previous condition (!oldSuspended) over-blocked
the (oldSuspended=false, newSuspended=true) transition — i.e. suspending
a running TrainJob while modifying spec.runtimePatches in the same call,
which is sa... (continued)

8 of 8 new or added lines in 1 file covered. (100.0%)

3 existing lines in 1 file now uncovered.

2023 of 3488 relevant lines covered (58.0%)

0.67 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
74.07
-11.11% pkg/runtime/core/core.go
Jobs
ID Job ID Ran Files Coverage
1 25393884502.1 05 May 2026 06:15PM UTC 40
58.0
GitHub Action Run
Source Files on build 25393884502
  • Tree
  • List 40
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • da938b74 on github
  • Prev Build on release-2.2 (#24921723674)
  • Next Build on release-2.2 (#25921057490)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc