fix: when helm application modify, but UpdateTime not update (#5948)

* Fixed an issue where categories were not updated in the App Store after the app template was republished

Signed-off-by: bingbing ma <bingbing.ma@gientech.com>

* fix: when helm application modify, but UpdateTime not update

Signed-off-by: bingbing ma <bingbing.ma@gientech.com>

---------

Signed-off-by: bingbing ma <bingbing.ma@gientech.com>
Co-authored-by: bingbing ma <bingbing.ma@gientech.com>
This commit is contained in:
bbma
2023-10-23 13:44:21 +08:00
committed by GitHub
parent 5a97b3f5e9
commit 5c685102de

View File

@@ -469,6 +469,12 @@ func (c *applicationOperator) ModifyApp(appId string, request *ModifyAppRequest)
return err
}
_, err = c.appClient.UpdateStatus(context.TODO(), appCopy, metav1.UpdateOptions{})
if err != nil {
klog.Errorf("update helm application status: %s failed, error: %s", appId, err)
return err
}
_, err = c.appClient.Patch(context.TODO(), appId, patch.Type(), data, metav1.PatchOptions{})
if err != nil {
klog.Errorf("patch helm application: %s failed, error: %s", appId, err)
@@ -478,6 +484,7 @@ func (c *applicationOperator) ModifyApp(appId string, request *ModifyAppRequest)
}
return err
}
return nil
}