-
Notifications
You must be signed in to change notification settings - Fork 543
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
Allow subseconds precision for the watch latency measurements for write and update operations #1935
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
Welcome @dumb0002! |
Hi @dumb0002. 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 Once the patch is verified, the new status will be reflected by the 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dumb0002 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@wojtek-t : you raise a very good point, which I think begs a much bigger observability question --- being able to observe relationships between different writes and string them together by causality. If our control plane were imperative this would be solved by distributed tracing. For a kube-style control plane we need something different but analogous, with a focus on object writes rather than remote invocations. The point of this here PR is to facilitate study of the primitive step, the latency from one client submitting a write to another client getting notified of the updated state. It is not intended to solve the higher level problem, but rather support study of the primitive step. |
|
@wojtek-t: signed the CLA |
Could you describe more how are you going to use this? Are you going to implement some clusterloader measurement that will use that? Or some internal tool you own requires this? Overall, I'm not fan of this solution: it adds a piece of code to the shared code that will be useful only for your specific use case. Instead of this pattern, I would suggest adding a template function that returns current time and using it as part of your own test configs. This will be simpler, more reusable and will not change objects in all our tests. |
@@ -264,6 +271,10 @@ func CreateObject(dynamicClient dynamic.Interface, namespace string, name string | |||
gvk := obj.GroupVersionKind() | |||
gvr, _ := meta.UnsafeGuessKindToResource(gvk) | |||
obj.SetName(name) | |||
|
|||
ti0 := time.Now() | |||
obj.SetAnnotations(map[string]string{CreateTimestampAnnotation: ti0.Format(TimestampLayout)}) |
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.
Correct me if I'm wrong but this seems to set Annotation for all objects and actually doesn't require " annotations: {{.Annotations}}" as specified in the reviewers notes.
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.
you're correct. That was a wrong statement in the reviewers notes - I just update it.
@mborsz , yes, I am going to implement a clusterloader measurement to measure the "watch latency" for CL2 object writes. This new measurement will use the changes from this PR. Right now CL2 only measure the watch latency for pods. Measuring the watch latency for other objects (e.g., configmaps, secrets, etc) which have subsecond precision is also useful for the k8s scalability analysis. |
/easycla |
This reverts commit b2f1880.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
@dumb0002: PR needs rebase. 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. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In 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. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR inserts a client-side timestamp annotation for every write and patch operations and it allows subsecond precision measurements for the "watch latency" out to watch or informer clients.
a) CREATE
b) UPDATE
Which issue(s) this PR fixes:
This PR allows finer precision for the "watch latency", when we need subsecond precision timestamps - it addresses the no milliseconds time precision in kubernetes.
Fixes #
Special notes for your reviewer:
NONE
Does this PR introduce a user-facing change?:
"NONE"
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: