Skip to content

Commit

Permalink
Fix operator upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
torirevilla authored Oct 19, 2023
1 parent 8e725a9 commit c681cfc
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions operator/controllers/orchestrator/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1745,16 +1745,18 @@ func (i *Installer) GetACPVersion() string {
return acpVersion
}

acpVersionWithMetadata := versionResponse.ACPServer.Version
if acpVersionWithMetadata != "" {
versionInfo, err := versionutils.ParseDate(acpVersionWithMetadata)
if err != nil {
Log().WithField("acpVersion", acpVersionWithMetadata).Errorf("unable to parse ACP version")
acpVersion = acpVersionWithMetadata
} else {
acpVersion = versionInfo.ShortStringWithRelease()
if versionResponse.ACPServer != nil {
acpVersionWithMetadata := versionResponse.ACPServer.Version
if acpVersionWithMetadata != "" {
versionInfo, err := versionutils.ParseDate(acpVersionWithMetadata)
if err != nil {
Log().WithField("acpVersion", acpVersionWithMetadata).Errorf("unable to parse ACP version")
acpVersion = acpVersionWithMetadata
} else {
acpVersion = versionInfo.ShortStringWithRelease()
}
Log().WithField("acpVersion", acpVersion).Info("trident-acp is up.")
}
Log().WithField("acpVersion", acpVersion).Info("trident-acp is up.")
}

return acpVersion
Expand Down

0 comments on commit c681cfc

Please sign in to comment.