-
Notifications
You must be signed in to change notification settings - Fork 910
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
add new cluster condition: CompleteAPIEnablements #5400
add new cluster condition: CompleteAPIEnablements #5400
Conversation
@XiShanYongYe-Chang could you help with this PR? |
Thanks @whitewindmills |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5400 +/- ##
==========================================
+ Coverage 33.86% 34.15% +0.29%
==========================================
Files 643 643
Lines 44509 44522 +13
==========================================
+ Hits 15072 15206 +134
+ Misses 28288 28160 -128
- Partials 1149 1156 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
1a949d8
to
693d5ce
Compare
@XiShanYongYe-Chang PTAL |
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
/cc @RainbowMango
/assign @RainbowMango |
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'm still thinking another approach:
In some cases, the controller can't collect a full list of API list continuously, such as there is a broken APIService in the member cluster, and thus will block the controller update the status of the Cluster object. And that's exactly the reason that we accept the partial list.
I'm thinking what if we just skip the .status.apiEnablements updating in case of we can't get full list of APIs? Is it doable?
yes, this pr won't block the controller update. |
693d5ce
to
30b32c5
Compare
I had the same idea. Analyze the length of err or apienablements. Only update the status if err is not empty and apienablements is not empty. |
assuming this is the case, if a user installs a new CRD, this means that the new CRD will not be updated to the cluster state, resulting in the failure to propagate such CRs. |
at least the current situation is that if an API exists in the cluster state, we can consider it reliable, but if an API does not exist, we cannot consider it reliable. |
Our scheduling plugin |
ping @RainbowMango |
@RainbowMango @XiShanYongYe-Chang @chaunceyjiang |
Sure! Sorry, too many on my plate recently, it is also very important to the project. |
Please help to rebase this as the test matrix changed after release-1.11. |
Also, we need a release notes for this, this kind of API change. |
30b32c5
to
0308714
Compare
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
Since no tests cover this so far, have you tested it locally?
I happen to see the conditions on my local environment: - lastTransitionTime: "2024-09-13T09:04:15Z"
message: might collect partial APIEnablements(22) from the cluster
reason: PartialAPIEnablements
status: "False"
type: CompleteAPIEnablements And - lastTransitionTime: "2024-09-13T09:05:35Z"
message: collected complete APIEnablements from the cluster
reason: CompleteAPIEnablements
status: "True"
type: CompleteAPIEnablements Do you think we should have a shorter reason? Like |
looks reasonable. |
yes, I did test it but forgot to paste the result here. |
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
0308714
to
3307a52
Compare
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango 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 |
@yanfeng1992 @whitewindmills @chaunceyjiang By the way, introducing the condition doesn't break backward compatibility, and @XiShanYongYe-Chang has run some tests with it. |
sounds good! |
What type of PR is this?
/kind feature
What this PR does / why we need it:
since #5325 is closed, I open this PR to do it.
Which issue(s) this PR fixes:
Fixes #1804
Special notes for your reviewer:
Does this PR introduce a user-facing change?: