kubeflow / kubeflow/trainer

Namespaced Training Runtime webhook does not validate on update

Open
#3,686 3 comments 0 reactions 1 assignee Claimed by @robert-bell View on GitHub
area/webhook kind/bug
Dominant language
Go
Stars
2.2k
Forks
1.1k
Avg merge
3d 22h
Merged PRs (30d)
39

Description

### What happened?

The `TrainingRuntimeValidator` webhook does not validate `ReplicatedJobs` when a namespaced `TrainingRuntime` resource is updated. The `ValidateUpdate()` method is a no-op and currently returns `nil, nil` without performing any validation. The validation is only performed on creation.

This creates an inconsistency where:
- On creation: `ReplicatedJobs` are validated via `validateReplicatedJobs()` and invalid configurations are rejected
- On update: No validation occurs, allowing invalid `ReplicatedJob` configurations to be applied

This only affects namespaced runtimes; the `ClusterTrainingRuntime` webhook already does validation on both create and update. Looks like the validation might have been missed in #2307.

### What did you expect to happen?

The webhook should validate ReplicatedJobs consistently for both create and update operations.

### Environment

n/a

### Impacted by this bug?

Give it a 👍 We prioritize the issues with most 👍

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.