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

Fix: reconcile after configuration's hcl changed #360

Merged
merged 3 commits into from
Jun 8, 2023

Conversation

caoxingming
Copy link
Contributor

Reconcile again after configuration's hcl changed

Fixes #359

Signed-off-by: xingming01 <whatissoftware@163.com>
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 84.33% and project coverage change: -1.77 ⚠️

Comparison is base (3a96f68) 79.31% compared to head (2a130a1) 77.54%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #360      +/-   ##
==========================================
- Coverage   79.31%   77.54%   -1.77%     
==========================================
  Files          23       24       +1     
  Lines        1750     2053     +303     
==========================================
+ Hits         1388     1592     +204     
- Misses        278      366      +88     
- Partials       84       95      +11     
Flag Coverage Δ
e2e 0.00% <ø> (∅)
unit 80.36% <84.33%> (+1.04%) ⬆️

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

Impacted Files Coverage Δ
controllers/configuration/configuration.go 92.22% <0.00%> (-3.19%) ⬇️
controllers/terraform/status.go 77.41% <ø> (ø)
e2e/normal/regression.go 0.00% <ø> (ø)
controllers/configuration_controller.go 79.80% <85.51%> (+2.44%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@chivalryq chivalryq left a comment

Choose a reason for hiding this comment

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

Generally LGTM, please add some test.

Comment on lines +1414 to +1417
if kerrors.IsNotFound(err) {
return nil
}
return err
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if kerrors.IsNotFound(err) {
return nil
}
return err
return client.IgnoreNotFound(err)
Signed-off-by: xingming01 <whatissoftware@163.com>
@caoxingming
Copy link
Contributor Author

Generally LGTM, please add some test.

Added, thanks

Comment on lines +2393 to +2403
"create configuration for the first time": {
args: args{
meta: &TFConfigurationMeta{
ConfigurationCMName: "aa",
Namespace: "b",
ControllerNamespace: "b",
},
configurationType: "HCL",
},
want: want{
errMsg: "",
Copy link
Member

Choose a reason for hiding this comment

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

Case "Configuration is changed" is not tested, which is the point of this PR. Can you add some test for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Case "Configuration is changed" is not tested, which is the point of this PR. Can you add some test for that?

A case "Configuration changed, and reconcile"" was added

Signed-off-by: xingming01 <whatissoftware@163.com>
Copy link
Member

@chivalryq chivalryq left a comment

Choose a reason for hiding this comment

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

LGTM

@chivalryq chivalryq merged commit 3afed4a into kubevela:master Jun 8, 2023
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants