[release/1.7] Add cri-api v1alpha2 usage warning to all api calls#9479
Merged
dmcgowan merged 1 commit intocontainerd:release/1.7from Dec 6, 2023
Merged
[release/1.7] Add cri-api v1alpha2 usage warning to all api calls#9479dmcgowan merged 1 commit intocontainerd:release/1.7from
dmcgowan merged 1 commit intocontainerd:release/1.7from
Conversation
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
samuelkarp
approved these changes
Dec 6, 2023
| // emitUsageWarning emits a warning when v1alpha2 cri-api is called. | ||
| func (in *instrumentedAlphaService) emitUsageWarning(ctx context.Context) { | ||
| // Only emit the warning the first time an v1alpha2 api is called | ||
| in.emitWarning.Do(func() { |
Contributor
There was a problem hiding this comment.
this LGTM. I don't know how big this problem will be for the end user - it may be interesting to log the specific call that was called. This way customers received this warning may understand who called it
SergeyKanzhelev
approved these changes
Dec 6, 2023
dmcgowan
approved these changes
Dec 6, 2023
Member
|
/cherrypick release/1.6 |
|
@samuelkarp: #9479 failed to apply on top of branch "release/1.6": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
9 tasks
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.
Previous #9336 added warnings for the usage of cri-api
StatusandVersion.There are some use cases where clients might use cri-apis without calling those two apis. For example,
ContainerStatusto find the container for a certain pid for monitoring purposes.Therefore, this PR adds warning to all cri-api v1alpha2 apis.