Repository navigation
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
…not accept The controller appends one KUBEFLOW_TRAINER_OPT_<parameter> env var per parameter to trainJobTemplate.spec.trainer.env when it creates a trial. TrainJob's trainer.env is a map keyed by name with at most 128 items, so a template that already sets a prefixed name, or whose env plus parameters exceed 128, produces trials the API server always rejects. The controller then retries forever and the OptimizationJob never gets a Failed condition. Reject both cases when the OptimizationJob is created: reserve the KUBEFLOW_TRAINER_OPT_ prefix in the template's trainer env, and cap the template's trainer env plus parameters at 128. Fixes kubeflow#4285 Signed-off-by: raashed <mohammedraashed10@gmail.com>
rshdhere
force-pushed
the
fix-optimizationjob-template-env
branch
from
October 21, 2026 02:55
cf38a94 to
e327ccf
Compare
Contributor
|
/milestone v2.4 |
This branch has not been deployed
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.
What this PR does / why we need it:
The OptimizationJob controller adds one
KUBEFLOW_TRAINER_OPT_<parameter>env var per parameter totrainJobTemplate.spec.trainer.envwhen it creates a trial. If the template already sets one of those names, or its env vars plus the parameters go over TrainJob's limit of 128, every trial is rejected by the API server. The controller then retries forever and the OptimizationJob never fails, so it looks healthy but never starts. This PR adds two CEL rules onOptimizationJobSpecthat reject both cases when the job is created.KUBEFLOW_TRAINER_OPT_prefix in the template's trainer env. This also stops prefixed template env vars from showing up instatus.result.parameters.Builds on #4248, which adds
optimizationjob_test.goand theMakeOptimizationJobWrapperdefaults. Only the last commit is new here. I'll rebase once #4248 merges.AI-assisted: used for investigating the bug, drafting the fix and tests; all changes reviewed, built and tested locally.
Which issue(s) this PR fixes (optional, in
Fixes #<issue number>, #<issue number>, ...format, will close the issue(s) when PR gets merged):Fixes #4285
Checklist: