koordinator-sh / koordinator

A QoS-based scheduling system brings optimal layout and status to workloads such as microservices, web services, big data jobs, AI jobs, etc.
https://koordinator.sh
Apache License 2.0
1.36k stars 331 forks source link

koordlet: fix BlkIOReconcile plugin not using WaitForCacheSync method correctly to synchronize PVC resources #2205

Open Wangmin362 opened 2 months ago

Wangmin362 commented 2 months ago

Ⅰ. Describe what this PR does

Add the statesInformer.HasSynced method to wait for the PVC resource synchronization to complete.

If the WaitForCacheSync method is not passed a second parameter, the return value is always true

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

saintube commented 2 months ago

@Wangmin362 Thanks for your nice catch! Please check the failure reason of the DCO check before the PR is merging. image

songtao98 commented 2 months ago

/lgtm Please check the DCO information and sign off your commit to make it mergable @Wangmin362

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 67.74%. Comparing base (4f16162) to head (23249e0).

Files with missing lines Patch % Lines
...ordlet/qosmanager/plugins/blkio/blkio_reconcile.go 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2205 +/- ## ========================================== + Coverage 67.72% 67.74% +0.01% ========================================== Files 446 446 Lines 42697 42697 ========================================== + Hits 28918 28923 +5 + Misses 11257 11255 -2 + Partials 2522 2519 -3 ``` | [Flag](https://app.codecov.io/gh/koordinator-sh/koordinator/pull/2205/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=koordinator-sh) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/koordinator-sh/koordinator/pull/2205/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=koordinator-sh) | `67.74% <0.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=koordinator-sh#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.