You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using this tool, i have observed that initial rollback is not happening while it is showing it is completed.
As per the logs rollback is happing from 2-->2 instead of 2-->1.
below are the logs while initiating rollback:
once i click on Rollback then i can see that rollback is happening from 2 to 2 only. ideally it should be 2-->1
As a workaround i modified the backend code(golang) where i added a condition as below but actual resolution should be in frontend only.
pkg/dashboard/objects/releases.go
hc, err := r.HelmConfig(r.Orig.Namespace)
if err != nil {
return errorx.Decorate(err, "failed to get helm config for namespace '%s'", "")
}
log.Infof("Revision value is from Post Data -->%d", toRevision)
if r.Orig.Version == toRevision {
log.Infof("Special handling for rollback when both versions are same")
toRevision= r.Orig.Version - 1
}
log.Infof("Modified Revison values is -->%d", toRevision)
client := action.NewRollback(hc)
client.Version = toRevision
err = client.Run(r.Orig.Name)
if err != nil {
return errorx.Decorate(err, "failed to rollback the release")
}
log.Infof("Rolled back %s/%s to %d=>%d", r.Orig.Namespace, r.Orig.Name, r.Orig.Version, toRevision)
return nil
Hi Team,
While using this tool, i have observed that initial rollback is not happening while it is showing it is completed.
As per the logs rollback is happing from 2-->2 instead of 2-->1.
below are the logs while initiating rollback:
INFO[9115] Rolled back default/du to 2=>2
[GIN] 2024/12/24 - 08:25:07 | 202 | 1.499399089s | 172.21.42.98 | POST "/api/helm/releases/default/du/rollback"
[GIN] 2024/12/24 - 08:25:07 | 200 | 45.091µs | 172.21.42.98 | GET "/"
[GIN] 2024/12/24 - 08:25:07 | 200 | 91.224µs | 172.21.42.98 | GET "/assets/analytics.js"
[GIN] 2024/12/24 - 08:25:07 | 200 | 192.422µs | 172.21.42.98 | GET "/assets/index-f1036a4b.css"
[GIN] 2024/12/24 - 08:25:07 | 200 | 34.224µs | 172.21.42.98 | GET "/status"
[GIN] 2024/12/24 - 08:25:07 | 200 | 392.330147ms | 172.21.42.98 | GET "/api/helm/releases/default/du/history"
[GIN] 2024/12/24 - 08:25:08 | 200 | 653.089758ms | 172.21.42.98 | GET "/assets/index-7d01864f.js"
[GIN] 2024/12/24 - 08:25:08 | 200 | 94.302µs | 172.21.42.98 | GET "/assets/logo-header-1db0e193.svg"
[GIN] 2024/12/24 - 08:25:08 | 200 | 23.42µs | 172.21.42.98 | GET "/assets/arrow-down-icon-940a5660.svg"
[GIN] 2024/12/24 - 08:25:08 | 200 | 22.991µs | 172.21.42.98 | GET "/assets/k8s-watcher-f6ceb5e3.svg"
[GIN] 2024/12/24 - 08:25:08 | 200 | 30.973µs | 172.21.42.98 | GET "/status"
[GIN] 2024/12/24 - 08:25:08 | 200 | 154.919µs | 172.21.42.98 | GET "/assets/body-background-89ce527b.svg"
[GIN] 2024/12/24 - 08:25:08 | 200 | 36.388µs | 172.21.42.98 | GET "/assets/logo.svg"
[GIN] 2024/12/24 - 08:25:09 | 200 | 349.068962ms | 172.21.42.98 | GET "/api/helm/releases/default/du/history"
While trying to do it from API:
INFO[9175] Rolled back default/du to 2=>1
[GIN] 2024/12/24 - 08:26:07 | 202 | 1.634760999s | 172.21.42.98 | POST "/api/helm/releases/default/du/rollback"
[GIN] 2024/12/24 - 08:28:48 | 200 | 625.815µs | 172.21.42.98 | GET "/api/k8s/contexts"
[GIN] 2024/12/24 - 08:28:48 | 200 | 74.477µs | 172.21.42.98 | GET "/assets/packges-header-4f4494c9.svg"
[GIN] 2024/12/24 - 08:28:48 | 200 | 607.324541ms | 172.21.42.98 | GET "/api/helm/releases"
[GIN] 2024/12/24 - 08:28:48 | 200 | 43.53704ms | 172.21.42.98 | GET "/api/helm/releases/default/bbdev/resources?health=true"
seems like UI is not sending appropriate info
The text was updated successfully, but these errors were encountered: