-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
apf: use EventClock for queueset #103829
apf: use EventClock for queueset #103829
Conversation
/assign @MikeSpreitzer @wojtek-t |
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.
This fundamentally breaks the FakeEventClock. By extending FakeEventClock with methods that synchronize via channels rather than event functions, it lets client code have active goroutines that FakeEventClock::Run does not wait for. That means that all the test funcs built on FakeEventClock::Run do not properly exercise the code under test (if that code uses the added methods of FakeEventClock).
/triage accepted |
@tkashem - I think we can close it in favor of @MikeSpreitzer PR. |
waiting for #103830 to merge, then I will use |
52213a1
to
215ee9a
Compare
a717587
to
797b435
Compare
This is not based on the latest rev of #103830 . Other than that, looks OK. |
797b435
to
c2a3b79
Compare
rebase completed |
fqs "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset" | ||
"k8s.io/apiserver/pkg/util/flowcontrol/metrics" | ||
kubeinformers "k8s.io/client-go/informers" | ||
"k8s.io/klog/v2" | ||
utilclock "k8s.io/utils/clock" |
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.
I wouldn't bother to rename this import, let it be known as "clock". We are trying to move everything that was using k8s.io/apimachinery/pkg/util/clock
to k8s.io/utils/clock
so that we can retire k8s.io/apimachinery/pkg/util/clock
.
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.
we have two clock packages being used here - fairqueuing
and utils
, so the prefix makes it more explicit, but i am fine either way.
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.
k8s.io/utils/clock
is the base clock package. k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/clock
builds on that, adding EventClock
. Now that I think of it, it would be better if the latter were k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/eventclock
.
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.
@MikeSpreitzer yes, i agree, eventclock
is a better name - can we merge this PR? I am happy to open a separate PR with the rename.
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.
Mike already have one opened.
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.
Looks OK except for the import name.
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
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MikeSpreitzer, tkashem, wojtek-t The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-kubernetes-integration |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
apf: use
EventClock
for queueset, this paves the way for writing unit tests for #103240Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: