From d6e8bc37b80d80a006042087ef76475747f26edb Mon Sep 17 00:00:00 2001 From: Ashraf Fouda Date: Mon, 27 Jul 2026 17:43:49 +0300 Subject: [PATCH] fix(update-worker): hold latest link at GA until safe_to_upgrade Only advance the per-network `latest` flist symlink when the chain marks the version safe_to_upgrade. During a canary rollout (safe_to_upgrade = false) the symlink stays pinned to the last GA version, so freshly bootstrapped nodes and non-canary nodes keep booting/running GA instead of picking up the canary version. Canary farms (config test_farms) still receive the canary via the node upgrader, which targets the chain version tag directly. The worker already parsed SafeToUpgrade but never used it. Co-Authored-By: Claude Opus 4.8 --- tools/zos-update-worker/internal/update_worker.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/zos-update-worker/internal/update_worker.go b/tools/zos-update-worker/internal/update_worker.go index f19e0c907..e07c40211 100644 --- a/tools/zos-update-worker/internal/update_worker.go +++ b/tools/zos-update-worker/internal/update_worker.go @@ -123,6 +123,15 @@ func (w *Worker) updateZosVersion(network Network, manager client.Manager) error return nil } + // During a canary rollout (safe_to_upgrade == false) the version is delivered only to + // the configured test farms by the node upgrader. Keep the network `latest` symlink + // pointing at the last GA version so freshly bootstrapped nodes (and non-canary nodes) + // don't pick up the canary version. + if !chainVersion.SafeToUpgrade { + log.Debug().Msgf("skipping %v latest link update: version %v is not marked safe to upgrade yet", network, chainVersion.Version) + return nil + } + log.Debug().Msgf("getting substrate version %v for network %v", chainVersion.Version, network) // now we need to find how dst is relative to src