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
Set 0 sync period in scheduler integration test #82222
Set 0 sync period in scheduler integration test #82222
Conversation
@@ -448,7 +448,7 @@ func TestPreFilterPlugin(t *testing.T) { | |||
// Create the master and the scheduler with the test plugin set. | |||
context := initTestSchedulerWithOptions(t, | |||
initTestMaster(t, "prefilter-plugin", nil), | |||
false, nil, registry, plugins, emptyPluginConfig, false, time.Second) | |||
false, nil, registry, plugins, emptyPluginConfig, false) |
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.
is it a good idea if you specify the sync period as 0
explicitly? rather than assuming the default value.
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.
Setting to 0
is a common pattern and I believe it's the default value. And again, the "sync period" is NOT syncing with apiserver. See:
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.
And setting to 0 doesn’t mean never resync, my memory is that it underneath sets it to a random 10ish minute.
/retest |
1 similar comment
/retest |
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
Thanks!
The detail for resync period could be found at https://groups.google.com/forum/#!msg/kubernetes-sig-api-machinery/PbSCXdLDno0/hEG1YykvDQAJ
/hold batches including this PR are flaking badly on scheduler integration tests:
please review closely to ensure this is not introducing a regression |
This PR needs further work. I will take a close look. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
/retest |
/hold is this making the integration tests run in a way that does not match the real kube-scheduler environment? The analysis in #96071 (comment) seems to indicate the event handlers the scheduler is attaching to the informer do not handle update events correctly. Is this PR masking that bug? |
Nope, kube-scheduler always adopts the 0 resync period for a while:
It's just the integration tests that were written in a "1-second-resync" style. |
ok, thanks /hold cancel |
2d96d5e
to
51d1728
Compare
/retest |
Hmm.. it seems this PR falls into a weird CI bug. Updated:
The failure got worked around by rebasing master and force push again. |
51d1728
to
af384f2
Compare
/retest |
@alculquicondor @adtac comments have been addressed. PTAL. |
/lgtm |
@liggitt would you mind /approve the changes in |
Kindly ping @liggitt for /approve. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, hex108, Huang-Wei, liggitt 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 |
/milestone v1.20 |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
The resync period reconciles between the in-memory cache and the business logic. It's a misunderstanding that it's used to sync with apiserver. A common pattern is set it to 0 and widely used across the codebase.
This PR sets the resync period to 0.
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
/sig scheduling
/priority important-longterm