-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
Split APIVersion into APIGroup and APIVersion in audit events #50007
Split APIVersion into APIGroup and APIVersion in audit events #50007
Conversation
Hi @CaoShuFeng. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. 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. I understand the commands that are listed here. |
I haven't figure out how to make a pull request depends on another one! |
ed875de
to
7c0b0ee
Compare
@crassirostris @sttts @ericchiang |
splitTed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
func TestConversion(t *testing.T) { | ||
scheme.Log(t) | ||
|
||
testcases := map[string]struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: To be consistent with the rest of the tests, use structs and add desc
field
And later, use t.Run(tc.desc, func () { ... })
to populate description to the logs instead of manually adding it to the format
7c0b0ee
to
4fe1439
Compare
/test pull-kubernetes-e2e-gce-etcd3 |
/test pull-kubernetes-e2e-gce-etcd3 |
@CaoShuFeng LGTM One nit: WDYT about making the tests uniform, i.e. run them using |
I think this would take too much time and t.Run() is not used everywhere is this project workspace.. |
As I've mention in another PR, if there's no kubernetes-wide policy about tests, do as you wish, that's just my feeling that writing t.Run once is better than appending description in each log line, at least for new/modified tests Also, here are examples of such convention used in Kubernetes: https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kubelet_pods_test.go#L158 https://github.com/kubernetes/kubernetes/blob/master/pkg/api/v1/helper/helpers_test.go#L51 https://github.com/kubernetes/kubernetes/blob/master/pkg/auth/nodeidentifier/default_test.go#L58 |
@CaoShuFeng What's the status of this PR? |
I will rebase this change. |
// APIGroup is the name of the API group that contains the referred object. | ||
// The empty string represents the core API group. | ||
// +optional | ||
APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,5,opt,name=apiGroup"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong protobuf index. We cannot reuse 5.
The protobuf index must be updated. I don't think we need the release-note if we introduce a v1beta1 group. We should have one "big" release-note for the new group in the PR which switches it on. |
audit.Event.ObjectRef.APIVersion currently holds both the the API group and version, separated by a /. This change break these out into separate fields. This is part of: kubernetes#48561
4fe1439
to
f94ca49
Compare
/test pull-kubernetes-e2e-kops-aws |
/test pull-kubernetes-e2e-gce-etcd3 |
/test pull-kubernetes-e2e-kops-aws |
/retest |
/lgtm |
/approve no-issue |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CaoShuFeng, sttts Associated issue requirement bypassed by: sttts The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest |
2 similar comments
/retest |
/retest |
/retest |
/retest Review the full test history for this PR. |
Automatic merge from submit-queue (batch tested with PRs 51632, 51055, 51676, 51560, 50007) |
audit.Event.ObjectRef.APIVersion currently holds both the the API group and
version, separated by a /. This change break these out into separate fields.
Release note: