-
Notifications
You must be signed in to change notification settings - Fork 921
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
keep collecting status when apply failed #2991
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Codecov Report
@@ Coverage Diff @@
## master #2991 +/- ##
==========================================
+ Coverage 38.58% 39.02% +0.44%
==========================================
Files 206 206
Lines 18798 18807 +9
==========================================
+ Hits 7253 7340 +87
+ Misses 11117 11032 -85
- Partials 428 435 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Can we add ut for this? Also, we need release notes. |
/lgtm cc @XiShanYongYe-Chang for checking |
/assign |
Can you explain it in more detail? Where do we |
If failed to apply, aggregated status will not be set even though status exists in work status and this function just returns. karmada/pkg/util/helper/workstatus.go Lines 186 to 196 in 3d06bb8
Actually, apply is sort of synchronization from 'karmada' to 'member clusters', it only take effects on resource metadata and spec. However, status collection is a synchronization from 'member clusters' to 'karmada'. So it is unresonable to skip status aggregation when failed to apply because these two actions have no identical relationship. |
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.
Hi @Garrybest, I think the modification is reasonable.
Do you encounter this problem? After a resource fails to be applied, the status of the work exists.
In addition, we have a similar logic. Please confirm whether to modify it:
karmada/pkg/controllers/federatedresourcequota/federated_resource_quota_status_controller.go
Line 183 in a20dd6e
if !applied { |
This one looks more like a cleanup, what do you think @Garrybest? |
Yes, I got a validation webhook in member cluster which rejects the modification whereas it had no effects on status collection.
Cool.
I'm not sure about the category, cc @RainbowMango for help😄. |
Signed-off-by: Garrybest <[email protected]>
Signed-off-by: Garrybest <[email protected]>
3377572
to
bcae500
Compare
The reason why
|
Got it, it makes sense. Well, in this case, deployment of status will be erased here. So users will see a deployment with 0 ready replicas and 0 available replicas from status, maybe this situation brings a panic for users. These two different logic represents different consideration and scenarios, which one is more sensible? Glad to here more opinions😊. |
Yes, I agree that just erasing the previous status is not ideal behavior, but I think we have sent the event to the resource template, isn't it? it should be a relief. |
Actually I'm just concerned that users are likely to have their own controllers in karmada control plane which depend on object status to reconcile and the handling process could be disrupted since status does not collect correctly under this circumstance. Well, it's just some ideas, sort of design tradeoff😄. We may need more evidences and scenario about this patch. |
Yes. kind of tradeoff here. |
I'm trying to figure out which PR/Issue should be included in the coming v1.7 release which is planned at the end of this month. @XiShanYongYe-Chang Could you please confirm if we still facing this issue? I feel we solved a similar issue somewhere. Not sure about that. |
Signed-off-by: Garrybest [email protected]
What type of PR is this?
/kind bug
What this PR does / why we need it:
If there is something wrong with applied condition, we should not erase the status in binding status. Applied information is from execution controller whereas status is from work status controller.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: