Skip to content

feat(runtimes): implement clusterTrainingRuntime deprecation process#2791

Merged
google-oss-prow[bot] merged 13 commits into
kubeflow:masterfrom
tdn21:issue-2789/implement-cluster-training-runtimes-deprecation-process
Oct 16, 2025
Merged

feat(runtimes): implement clusterTrainingRuntime deprecation process#2791
google-oss-prow[bot] merged 13 commits into
kubeflow:masterfrom
tdn21:issue-2789/implement-cluster-training-runtimes-deprecation-process

Conversation

@tdn21
Copy link
Copy Markdown
Contributor

@tdn21 tdn21 commented Aug 20, 2025

What this PR does

Implements the ClusterTrainingRuntime deprecation policy by surfacing admission warnings when:

  • Creating a ClusterTrainingRuntime labeled trainer.kubeflow.org/support=deprecated.
  • Creating/updating a TrainJob that references a deprecated ClusterTrainingRuntime.

Why we need it

This makes users aware of deprecated runtimes at the time of creating ClusterTrainingRuntimes or TrainJobs per the runtime deprecation policy:
https://www.kubeflow.org/docs/components/trainer/operator-guides/runtime/#runtime-deprecation-policy

Which issue(s) this PR fixes:

Fixes #2789

Checklist:

  • Docs included if any changes are user facing

Notes

  • Warning message includes the policy URL for user guidance
  • SDK-side warnings (listing/referencing runtimes) will be addressed in a separate PR in the SDK repo

@tdn21 tdn21 force-pushed the issue-2789/implement-cluster-training-runtimes-deprecation-process branch from c5b0011 to 2a059ec Compare August 20, 2025 18:53
@tdn21 tdn21 marked this pull request as ready for review August 21, 2025 06:58
@google-oss-prow google-oss-prow Bot requested a review from astefanutti August 21, 2025 06:58
Comment thread pkg/constants/constants.go Outdated
LabelDeprecated string = "trainer.kubeflow.org/deprecated"

// DeprecatedTrueValue is the value indicating deprecation when used with LabelDeprecated.
DeprecatedTrueValue string = "true"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost a nit, but I wonder if this should be treated as a "flag" and only check for the label existence not its value. I don't think trainer.kubeflow.org/deprecated=false really makes sense in practice.

And to be sure that's future proof, are we foreseeing the need for other values in the lifecycle of runtimes like alpha, stable ...

@andreyvelich @tenzen-y @Electronic-Waste WDYT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that make sense, but do you prefer that we use other label to identify lifecycle of a runtime (e.g. alpha, stable, deprecated) ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we think it's the right way to go, yes I was thinking something like trainer.kubeflow.org/support="alpha|stable|deprecated"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @astefanutti and @andreyvelich for the thoughtful input.
I also think that updating the label to something like trainer.kubeflow.org/support or trainer.kubeflow.org/lifecycle would be a more future-proof approach, as it better conveys the runtime’s lifecycle stage.

(Once we reach a consensus on the final label name, I’ll go ahead and update the PR accordingly and also open a separate PR to adjust the related documentation.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we see any advantages to introduce alpha? Official CTRs maintained by us are CustomResource, not CRD, which needs to maintain the API and display maturity level to users. And I think, the maturity of CRs is determined by CRD, since we always make the optimal design decision for the CR resource based on the APIs provided by CRD.

Given these facts, I think trainer.kubeflow.org/deprecated=true is enough. If CTRs does not have this label or have its value set to true, we consider it having the same maturity level with their CRD, ClusterTrainingRuntime. WDYT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would distinguish maturity of CRD APIs and maturity of supported runtimes, since the CRD might be in the v1 stage, but the runtime is unstable and can introduce breaking changes. For example, we can decide to remove some packages from the runtime (e.g. transformers).

However, we can end up with never introducing the maturity level for the runtimes, if we don't see strong signal from users.


All in all, my suggestion is to keep trainer.kubeflow.org/support=deprecated label for now to make sure we can introduce other support levels in the future if that is required.

@tenzen-y Any thoughts ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also differentiate the maturity of the CRD APIs from that of the runtimes.

For the maturity levels of the runtimes, it's likely that downstream projects / companies do not use the upstream runtimes directly but productize their own runtimes and can define those levels according to their own policies.

So I'd also suggest to "standardize" the trainer.kubeflow.org/support label without enforcing values and let those projects / companies the freedom to set it freely.

For upstream we can start with trainer.kubeflow.org/support=deprecated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on trainer.kubeflow.org/support=deprecated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. Let's use trainer.kubeflow.org/support=deprecated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! updated. (51b95cf)

Copy link
Copy Markdown
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @tdn21!
/ok-to-test

Comment thread pkg/constants/constants.go Outdated
LabelDeprecated string = "trainer.kubeflow.org/deprecated"

// DeprecatedTrueValue is the value indicating deprecation when used with LabelDeprecated.
DeprecatedTrueValue string = "true"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that make sense, but do you prefer that we use other label to identify lifecycle of a runtime (e.g. alpha, stable, deprecated) ?

Comment thread pkg/runtime/core/clustertrainingruntime.go Outdated
Comment thread pkg/webhooks/clustertrainingruntime_webhook.go Outdated
testingutil "github.com/kubeflow/trainer/v2/pkg/util/testing"
)

func TestClusterTrainingRuntime_ValidateCreate_DeprecatedWarning(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, having both would be better. Let me add integration test as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the suggestion @andreyvelich. I have added the integration tests.
Just a quick note:

  • In the integration tests, we aren’t asserting warnings since controller-runtime’s client doesn’t expose admission warnings. These tests only validate that resource creation succeeds and isn’t blocked.
  • The actual warning text is validated in the unit tests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, having both would be better. Let me add integration test as well.

I don't think so. The webhook integration test for verification webhook behavior and marker validatiion.
The only UTs should be better.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on UTs. That will be enough:)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thank you! 🙇
I've removed earlier added integration tests. (62f7931)

@coveralls
Copy link
Copy Markdown

coveralls commented Aug 21, 2025

Pull Request Test Coverage Report for Build 18546363197

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 9 of 28 (32.14%) changed or added relevant lines in 3 files are covered.
  • 192 unchanged lines in 10 files lost coverage.
  • Overall coverage increased (+0.01%) to 52.147%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/util/trainingruntime/trainingruntime.go 0 6 0.0%
pkg/runtime/core/clustertrainingruntime.go 0 13 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/runtime/framework/plugins/registry.go 2 0.0%
pkg/runtime/framework/plugins/jobset/builder.go 7 0.0%
pkg/runtime/runtime.go 7 72.12%
pkg/runtime/core/clustertrainingruntime.go 11 33.33%
pkg/runtime/framework/core/framework.go 15 84.69%
pkg/runtime/framework/plugins/torch/torch.go 22 84.18%
pkg/controller/trainjob_controller.go 24 0.0%
pkg/runtime/framework/plugins/coscheduling/coscheduling.go 30 33.33%
pkg/runtime/framework/plugins/jobset/jobset.go 31 52.97%
pkg/runtime/core/trainingruntime.go 43 72.02%
Totals Coverage Status
Change from base Build 17469034215: 0.01%
Covered Lines: 1263
Relevant Lines: 2422

💛 - Coveralls

@tdn21 tdn21 requested a review from andreyvelich August 22, 2025 13:12
testingutil "github.com/kubeflow/trainer/v2/pkg/util/testing"
)

func TestClusterTrainingRuntime_ValidateCreate_DeprecatedWarning(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func TestClusterTrainingRuntime_ValidateCreate_DeprecatedWarning(t *testing.T) {
func ValidateCreate(t *testing.T) {

The UTs should be for the top level exposed function. We should avoid implementing UTs each for action.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tdn21 Splitting with _ is python coding styling. In golang, we use camel style. And it will also be better to use a tidy and short name:)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Updated! (ref)

Comment on lines +34 to +63
_, ctx := ktesting.NewTestContext(t)
ctx, cancel := context.WithCancel(ctx)
t.Cleanup(cancel)

obj := testingutil.MakeClusterTrainingRuntimeWrapper("test-runtime").
RuntimeSpec(trainer.TrainingRuntimeSpec{
Template: trainer.JobSetTemplateSpec{
Spec: func() jobsetv1alpha2.JobSetSpec {
js := testingutil.MakeJobSetWrapper("", "")
js.Replicas(1, constants.DatasetInitializer, constants.ModelInitializer, constants.Node)
return js.Obj().Spec
}(),
},
}).Obj()

if obj.Labels == nil {
obj.Labels = map[string]string{}
}
obj.Labels[constants.LabelDeprecated] = constants.DeprecatedTrueValue

validator := &ClusterTrainingRuntimeWebhook{}
warnings, err := validator.ValidateCreate(ctx, obj)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
var want admission.Warnings
want = append(want, "ClusterTrainingRuntime \"test-runtime\" is deprecated and will be removed in a future release of Kubeflow Trainer. See runtime deprecation policy: "+constants.RuntimeDeprecationPolicyURL)
if diff := cmp.Diff(want, warnings); diff != "" {
t.Fatalf("unexpected warnings (-want, +got): %s", diff)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to follow the another test case.

Comment thread pkg/webhooks/trainjob_webhook_test.go Outdated
Obj(),
wantError: nil,
wantWarnings: admission.Warnings{"Referenced ClusterTrainingRuntime \"test-runtime\" is deprecated and will be removed in a future release of Kubeflow Trainer. See runtime deprecation policy: " + constants.RuntimeDeprecationPolicyURL},
deprecate: true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
deprecate: true,
clusterTrainingRuntime: ...

Handling test data by the boolean is not good way. For more descriptive approach, we shoul define the clusterTrainingRuntime object.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thank you! (updated, ref)

Comment on lines +82 to +91
var warnings admission.Warnings
if clusterTrainingRuntime.Labels != nil {
if val, ok := clusterTrainingRuntime.Labels[constants.LabelDeprecated]; ok && val == constants.DeprecatedTrueValue {
warnings = append(warnings, fmt.Sprintf(
"Referenced ClusterTrainingRuntime \"%s\" is deprecated and will be removed in a future release of Kubeflow Trainer. See runtime deprecation policy: %s",
clusterTrainingRuntime.Name,
constants.RuntimeDeprecationPolicyURL,
))
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we should have these duplicate validations.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much @tenzen-y and @Electronic-Waste for your feedback. 🙇
Could you please help me better understand what we mean by "duplicate validations" here?

Currently, we warn in two different scenarios:

  • when creating a deprecated ClusterTrainingRuntime (via webhook), and
  • when a TrainJob references a deprecated ClusterTrainingRuntime (runtime validation via the TrainJob webhook).

Since these are separate user touchpoints, I feel it makes sense to keep both. That said, I completely agree we should deduplicate the code by using a helper. (added it here)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the "duplicate validations" means that you implement validation in both runtime plugin and webhook. Could we only examine the whether clustertrainingruntime is deprecated in webhook? Maybe that's enough:)

WDYT? @tdn21 @tenzen-y @andreyvelich @astefanutti

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is the warnings should only be emitted for TrainJobs that reference deprecated training runtimes, not for the creation of "deprecated" training runtimes themselves (which somewhat does not make much sense).

In that case, only the logic in the runtime is necessary, and the validation in the ClusterTrainingRuntime webhook is not necessary.

Copy link
Copy Markdown
Member

@Electronic-Waste Electronic-Waste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tdn21 Thanks for this. Can you follow up with this PR?

Comment thread pkg/constants/constants.go Outdated
LabelDeprecated string = "trainer.kubeflow.org/deprecated"

// DeprecatedTrueValue is the value indicating deprecation when used with LabelDeprecated.
DeprecatedTrueValue string = "true"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. Let's use trainer.kubeflow.org/support=deprecated

Comment on lines +82 to +91
var warnings admission.Warnings
if clusterTrainingRuntime.Labels != nil {
if val, ok := clusterTrainingRuntime.Labels[constants.LabelDeprecated]; ok && val == constants.DeprecatedTrueValue {
warnings = append(warnings, fmt.Sprintf(
"Referenced ClusterTrainingRuntime \"%s\" is deprecated and will be removed in a future release of Kubeflow Trainer. See runtime deprecation policy: %s",
clusterTrainingRuntime.Name,
constants.RuntimeDeprecationPolicyURL,
))
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

testingutil "github.com/kubeflow/trainer/v2/pkg/util/testing"
)

func TestClusterTrainingRuntime_ValidateCreate_DeprecatedWarning(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on UTs. That will be enough:)

testingutil "github.com/kubeflow/trainer/v2/pkg/util/testing"
)

func TestClusterTrainingRuntime_ValidateCreate_DeprecatedWarning(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tdn21 Splitting with _ is python coding styling. In golang, we use camel style. And it will also be better to use a tidy and short name:)

@tdn21 tdn21 force-pushed the issue-2789/implement-cluster-training-runtimes-deprecation-process branch from 7439fc6 to c880b0c Compare September 6, 2025 08:42
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@google-oss-prow google-oss-prow Bot added size/XXL and removed size/L labels Sep 6, 2025
@tdn21 tdn21 marked this pull request as draft September 6, 2025 08:57
Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
…ce constant

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
…ainingRuntime

Create ClusterTrainingRuntime with deprecated label; assert creation succeeds (warning is non-blocking)

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
…terTrainingRuntime

Mark ClusterTrainingRuntime deprecated; create TrainJob referencing it; assert creation succeeds (warning is non-blocking)

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
…lidateObjects

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
… webhooks

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
…on check

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
@tdn21 tdn21 force-pushed the issue-2789/implement-cluster-training-runtimes-deprecation-process branch from c880b0c to c74ae97 Compare September 6, 2025 09:02
@google-oss-prow google-oss-prow Bot added size/L and removed size/XXL labels Sep 6, 2025
@tdn21 tdn21 marked this pull request as ready for review September 6, 2025 09:30
Comment on lines +54 to +62
var warnings admission.Warnings
if labelutil.IsSupportDeprecated(clTrainingRuntime.Labels) {
warnings = append(warnings, fmt.Sprintf(
"ClusterTrainingRuntime \"%s\" is deprecated and will be removed in a future release of Kubeflow Trainer. See runtime deprecation policy: %s",
clTrainingRuntime.Name,
constants.RuntimeDeprecationPolicyURL,
))
}
return warnings, validateReplicatedJobs(clTrainingRuntime.Spec.Template.Spec.ReplicatedJobs).ToAggregate()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary. Warnings should only be emitted for TrainJobs referencing deprecated runtimes, not for the creation of ClusterTrainingRuntimes themselves.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@astefanutti According to our policy, we also show an error when user creates a deprecated Runtime: https://www.kubeflow.org/docs/components/trainer/operator-guides/runtime/#runtime-deprecation-policy
Do you prefer that we don't do this ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andreyvelich ah you're right, I missed this. That makes sense.

Comment thread pkg/util/labels/labels.go Outdated
@@ -0,0 +1,12 @@
package labels
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

Suggested change
package labels
package support

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer we call this package as runtime, similar to trainjob utils: https://github.com/kubeflow/trainer/blob/master/pkg/util/trainjob/trainjob.go

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea.

@andreyvelich
Copy link
Copy Markdown
Member

@tdn21 Did you get a chance to address the remaining comments ?
/milestone v2.1

@google-oss-prow google-oss-prow Bot added this to the v2.1 milestone Sep 24, 2025
@andreyvelich
Copy link
Copy Markdown
Member

ping @tdn21, we are planning to release v2.1.0-rc.0 this week.

Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
@andreyvelich
Copy link
Copy Markdown
Member

@astefanutti @Electronic-Waste @tdn21 @tenzen-y I've updated the package according to this comment: #2791 (comment)
Do we have any other changes we would like to make before merging this PR ?

@astefanutti
Copy link
Copy Markdown
Contributor

/lgtm

Thanks @tdn21 and everyone!

Copy link
Copy Markdown
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow Bot merged commit b17c6c9 into kubeflow:master Oct 16, 2025
31 checks passed
alexxfan pushed a commit to red-hat-data-services/trainer that referenced this pull request Nov 24, 2025
…ubeflow#2791)

* constants: add deprecation label constants for runtimes

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* webhooks: warn on creation of deprecated ClusterTrainingRuntime

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* runtime: warn when TrainJob references deprecated ClusterTrainingRuntime

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests: add unit test coverage for deprecation warnings

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* webhooks/runtime: update deprecation warning wording and tests

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* constants/webhooks/runtime: centralize runtime policy URL and reference constant

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests(integration/webhooks): add create case for deprecated ClusterTrainingRuntime

Create ClusterTrainingRuntime with deprecated label; assert creation succeeds (warning is non-blocking)

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests(integration/webhooks): add TrainJob create with deprecated ClusterTrainingRuntime

Mark ClusterTrainingRuntime deprecated; create TrainJob referencing it; assert creation succeeds (warning is non-blocking)

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests/runtime: cover deprecation warning in ClusterTrainingRuntime.ValidateObjects

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests(integration): remove deprecation-warning cases for CTR/TrainJob webhooks

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* feat(runtimes): switch to support=deprecated and centralize deprecation check

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests(webhooks): focus UTs on entrypoints and clean up tests/test data

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* Rename package from labels to trainingruntime

Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>

---------

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
Co-authored-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
mahdikhashan pushed a commit to mahdikhashan/trainer that referenced this pull request Dec 29, 2025
…ubeflow#2791)

* constants: add deprecation label constants for runtimes

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* webhooks: warn on creation of deprecated ClusterTrainingRuntime

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* runtime: warn when TrainJob references deprecated ClusterTrainingRuntime

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests: add unit test coverage for deprecation warnings

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* webhooks/runtime: update deprecation warning wording and tests

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* constants/webhooks/runtime: centralize runtime policy URL and reference constant

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests(integration/webhooks): add create case for deprecated ClusterTrainingRuntime

Create ClusterTrainingRuntime with deprecated label; assert creation succeeds (warning is non-blocking)

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests(integration/webhooks): add TrainJob create with deprecated ClusterTrainingRuntime

Mark ClusterTrainingRuntime deprecated; create TrainJob referencing it; assert creation succeeds (warning is non-blocking)

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests/runtime: cover deprecation warning in ClusterTrainingRuntime.ValidateObjects

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests(integration): remove deprecation-warning cases for CTR/TrainJob webhooks

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* feat(runtimes): switch to support=deprecated and centralize deprecation check

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* tests(webhooks): focus UTs on entrypoints and clean up tests/test data

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>

* Rename package from labels to trainingruntime

Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>

---------

Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
Co-authored-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement ClusterTrainingRuntimes Deprecation Process

6 participants