Skip to content

Commit 1f696a3

Browse files
authored
don't fail for envs that still used old format (#2476)
Signed-off-by: Ashraf Fouda <ashraf.m.fouda@gmail.com>
1 parent 9f54368 commit 1f696a3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tools/zos-update-worker/internal/update_worker.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ func (w *Worker) updateZosVersion(network Network, manager client.Manager) error
119119
err = json.Unmarshal([]byte(currentZosVersion), &chainVersion)
120120
if err != nil {
121121
log.Debug().Err(err).Msg("failed to unmarshal chain version")
122-
chainVersion.Version = currentZosVersion
123-
chainVersion.VersionLight = currentZosVersion
122+
// shouldn't fail for env that still not updated version format
123+
return nil
124124
}
125125

126126
log.Debug().Msgf("getting substrate version %v for network %v", chainVersion.Version, network)
@@ -135,7 +135,6 @@ func (w *Worker) updateZosVersion(network Network, manager client.Manager) error
135135
zosCurrent := fmt.Sprintf("%v/.tag-%v", w.src, chainVersion.Version)
136136
zosLatest := fmt.Sprintf("%v/%v", w.dst, network)
137137
// zos light
138-
// to handle the environments that aren't updated yet (mainnet)
139138
zosLightCurrent := fmt.Sprintf("%v/.tag-%v", w.src, chainVersion.VersionLight)
140139
zosLightLatest := fmt.Sprintf("%v/%v-v4", w.dst, network)
141140
// the link is like zosCurrent but it has the path relative from the symlink

0 commit comments

Comments
 (0)