Skip to content

Remove deprecated RDT fields #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2025

Conversation

askervin
Copy link
Contributor

@askervin askervin commented Aug 6, 2025

Drop IntelRdt.EnableCMT and EnableMBM, and switch to EnableMonitoring to match upstream runtime-spec.

@askervin
Copy link
Contributor Author

askervin commented Aug 6, 2025

@marquiz, @klihub, I ran into problems on latest upstream runtime-spec and cdi mismatches when I was trying to build containerd with the latest runtime-spec. This change helped building it, but I'm not very familiar with cdi, I might miss something essential in this PR. If you have time, please have a look with even more suspicion than usually. 👀 D

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Ach, CDI had those fields defined 🤦

Yes, those were removed from the runtime spec as they were really problematic and had no known runtime implementation. See opencontainers/runtime-spec#1287

Not sure how CDI should handle these. Just drop or filter out (or smth else) 🤔

@elezar
Copy link
Contributor

elezar commented Aug 6, 2025

@marquiz since you were the one to add the fields in the first place could you comment on whether these fields are used "in the wild"? If we think the risk of this is low we could drop the fields -- although this would required a spec version bump.

Also, how would we ensure that a modified spec is compatible with the incoming OCI runtime spec version as we would not want to adjust this.

@klihub
Copy link
Contributor

klihub commented Aug 6, 2025

Ach, CDI had those fields defined 🤦

Yes, those were removed from the runtime spec as they were really problematic and had no known runtime implementation. See opencontainers/runtime-spec#1287

Not sure how CDI should handle these. Just drop or filter out (or smth else) 🤔

I guess ideally/in principle we should deprecate those fields. So basically, remove the them from IntelRDT.toOCI() output, log a warning or an error if we load a CDI Spec file with either of those fields set to true, then in the next phase also refuse to load the whole CDI Spec if either is set. If we chose to do this, then additionally we should set the newly introduced EnableMonitoring field if either of the deprecated fields is set to true.

Then again, according to a comment by @marquiz in the above linked PR no known runtime implementations impemented either of these fields so if any CDI Spec currently in use tries to set those it anyway does not work correctly. So maybe we could just drop them altogether, like it is done in this PR. @elezar @bart0sh WDYT would be the proper course of actions here ?

@klihub
Copy link
Contributor

klihub commented Aug 6, 2025

@marquiz since you were the one to add the fields in the first place could you comment on whether these fields are used "in the wild"? If we think the risk of this is low we could drop the fields -- although this would required a spec version bump.

Also, how would we ensure that a modified spec is compatible with the incoming OCI runtime spec version as we would not want to adjust this.

@elezar According to @marquiz' original comment opencontainers/runtime-spec#1287 (comment), no known runtime implementation has ever implemented either of these fields. So it would seem to me that it should be safe to skip the deprecate-then-remove transitions and drop these in a single go.

@klihub
Copy link
Contributor

klihub commented Aug 6, 2025

@askervin Can you do a make mod-tidy and amend the changes to the commit in this PR. This repo has multiple go modules and it looks like you forgot to update go.{mod/sum} in some of them.

@marquiz
Copy link
Contributor

marquiz commented Aug 6, 2025

@marquiz since you were the one to add the fields in the first place could you comment on whether these fields are used "in the wild"? If we think the risk of this is low we could drop the fields -- although this would required a spec version bump.

I'd say the risk of somebody using those fields is very very low. There are no implementations for those and their specification was very vague/contradicting.

I guess ideally/in principle we should deprecate those fields. So basically, remove the them from IntelRDT.toOCI() output, log a warning or an error if we load a CDI Spec file with either of those fields set to true, then in the next phase also refuse to load the whole CDI Spec if either is set.

This might be the most proper way.

If we chose to do this, then additionally we should set the newly introduced EnableMonitoring field if either of the deprecated fields is set to true.

I would suggest not to do this to avoid further confusion and possible breakage in the future. People start to use and depend on these (for accident or whatever) and then if they're removed we brake them.

@askervin askervin force-pushed the 5cP_runtimespec_rdtchange branch from 93eccac to 49dfbc7 Compare August 7, 2025 05:55
cmd/cdi/go.mod Outdated
@@ -4,7 +4,7 @@ go 1.20

require (
github.com/fsnotify/fsnotify v1.5.1
github.com/opencontainers/runtime-spec v1.1.0
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6
Copy link
Contributor

Choose a reason for hiding this comment

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

If the new field is not yet in a new released spec version, then we could first remove the deprecated fields and then add the new field once a tag has been released.

@elezar
Copy link
Contributor

elezar commented Aug 7, 2025

I think the simplest solution is to remove the deprecated fields. It seems that the risk is relatively low that we have customers actually using this. Let's do this as a separate commit so that it's easier to track from a release notes / client perspective.

We can add the new field in a follow-up before releasing a new spec version.

@askervin
Copy link
Contributor Author

askervin commented Aug 7, 2025

@elezar, indeed, the new field is not yet released in runtime-spec. Removing old fields is not released either. So we are pretty well in sync.

Anyway, if handling this change in two PRs makes still sense to you, I'll keep this as "drop deprecated fields" PR, and create new PR that adds the new field. How that sounds?

@klihub
Copy link
Contributor

klihub commented Aug 7, 2025

@elezar, indeed, the new field is not yet released in runtime-spec. Removing old fields is not released either. So we are pretty well in sync.

Anyway, if handling this change in two PRs makes still sense to you, I'll keep this as "drop deprecated fields" PR, and create new PR that adds the new field. How that sounds?

@askervin @elezar Then IMO at least the PR for the new field should be kept as a draft and updated once a new runtime spec is tagged which has the new field. Removing the deprecated field could be merged right away IMO, though (as long as it does not change our runtime-spec dependency).

@elezar
Copy link
Contributor

elezar commented Aug 7, 2025

@elezar, indeed, the new field is not yet released in runtime-spec. Removing old fields is not released either. So we are pretty well in sync.
Anyway, if handling this change in two PRs makes still sense to you, I'll keep this as "drop deprecated fields" PR, and create new PR that adds the new field. How that sounds?

@askervin @elezar Then IMO at least the PR for the new field should be kept as a draft and updated once a new runtime spec is tagged which has the new field. Removing the deprecated field could be merged right away IMO, though (as long as it does not change our runtime-spec dependency).

Yes, let's drop the deprecated fields in a PR now (this should NOT have any dependency updates) and create a draft PR to be updated once a tagged spec is available for the new field.

Drop IntelRdt.EnableCMT and EnableMBM to match runtime-spec versions
after v1.2.1.

Signed-off-by: Antti Kervinen <[email protected]>
@askervin askervin force-pushed the 5cP_runtimespec_rdtchange branch from 49dfbc7 to 3ebd90e Compare August 7, 2025 13:34
@askervin askervin changed the title Update runtime-spec, drop deprecated RDT fields Remove deprecated RDT fields Aug 7, 2025
@askervin
Copy link
Contributor Author

askervin commented Aug 7, 2025

Thanks for guidance @klihub, @elezar, @marquiz.

PR #279 created as Draft, and this only removes RDT fields without updating runtime-spec version.

Copy link
Contributor

@elezar elezar left a comment

Choose a reason for hiding this comment

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

lgtm

@elezar elezar added this to the CDI Specification v1.1.0 milestone Aug 7, 2025
@elezar elezar merged commit 6b59f50 into cncf-tags:main Aug 7, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants