Skip to content
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

🐛 update mca progressing condition when desired and last applied matches #513

Conversation

haoqing0110
Copy link
Member

Summary

Related issue(s)

Fixes #

@openshift-ci openshift-ci bot requested review from zhiweiyin318 and zhujian7 June 12, 2024 08:19
@haoqing0110
Copy link
Member Author

/hold

Copy link

codecov bot commented Jun 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.11%. Comparing base (8e792c1) to head (1deac6b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #513      +/-   ##
==========================================
+ Coverage   62.08%   62.11%   +0.02%     
==========================================
  Files         141      141              
  Lines       11740    11744       +4     
==========================================
+ Hits         7289     7295       +6     
+ Misses       3678     3677       -1     
+ Partials      773      772       -1     
Flag Coverage Δ
unit 62.11% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@haoqing0110 haoqing0110 force-pushed the br_rm-mca-skip branch 2 times, most recently from c703e9d to 02adb45 Compare June 12, 2024 10:07
@haoqing0110
Copy link
Member Author

/assign @qiujian16 @xuezhaojun

@qiujian16
Copy link
Member

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jun 12, 2024
Copy link
Contributor

openshift-ci bot commented Jun 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haoqing0110, qiujian16

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -285,18 +285,6 @@ func workIsReady(work *workapiv1.ManifestWork) bool {

// set addon progressing condition and last applied
func setAddOnProgressingAndLastApplied(reason string, message string, addon *addonapiv1alpha1.ManagedClusterAddOn) {
// always update progressing condition when there is no config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to remove this skip?

Copy link
Member Author

@haoqing0110 haoqing0110 Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meet an issue: when addon applied configs successfully and then configs become unaccessible (eg, removed), the desired spec hash will be empty and report "mca and work configs mismatch", and when the configs added back, since lastapplied already the same as desired, so the error message will leave in the condition and can never trigger an update.

2 reasons feel safe to remove the skip:

  • In the previous code, add a skip to avoid "install" message changes to "upgrade" after a fresh install. With PR https://github.com/open-cluster-management-io/ocm/pull/499/files merged, won't have such issue.
  • Another reason is once the mca applied config successfully (lastapplied = desired), do not want to change the "Progressing" condition any more, to avoid back and forth in rollout. Feel safe to remove the skip because the setRolloutStatus only look at the lastapplied and desired, not message.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we add some comments here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added.

@qiujian16
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jun 13, 2024
@haoqing0110
Copy link
Member Author

/unhold

@openshift-merge-bot openshift-merge-bot bot merged commit 462992f into open-cluster-management-io:main Jun 13, 2024
14 checks passed
@haoqing0110 haoqing0110 deleted the br_rm-mca-skip branch June 13, 2024 06:40
haoqing0110 added a commit to haoqing0110/OCM that referenced this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants