[mirror] Fix --deckhouse-tag pull fail on unrelated suspended#404
Open
Glitchy-Sheep wants to merge 3 commits into
Open
[mirror] Fix --deckhouse-tag pull fail on unrelated suspended#404Glitchy-Sheep wants to merge 3 commits into
Glitchy-Sheep wants to merge 3 commits into
Conversation
…nels Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
- `fetchReleaseChannels` returns the versions map plus the suspended set, so the name no longer promises only versions. - `getReleaseChannelInfoFromRegistry` pairs with its `releaseChannelInfo` result. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
d8 mirror pull --deckhouse-tag vX.Y.Zfailed when any release channel in the source registry was suspended, even if the requested version had nothing to do with that channel.Now a suspension blocks the pull only when the requested tag actually matches the suspended channel.
Problem
getReleaseChannelVersionFromRegistry)Skipped releases lookup ...log line made it worse: it reads as "channels are not polled at all", while only the version range discovery is skippedFix
getReleaseChannelInfoFromRegistry(renamed fromgetReleaseChannelVersionFromRegistry) returnsreleaseChannelInfo: the version plus the suspended flag (the version is still needed for tag matching)versionsToMirror, aftermatchChannelsToTags: newcheckSuspendedChannelsrefuses the pull only when a matched channel is suspended--ignore-suspendstays the overrideSkipped releases range discovery ...Before / After
Before:

d8 mirror pull --deckhouse-tag v1.75.6failed withsuspended release channel "rock-solid"although v1.75.6 is not the rock-solid version.After: the same command succeeds and the suspended channel's alias is left out of the bundle. Requesting the suspended channel itself (by name or its current version) still fails without

--ignore-suspend.Tests
Verified live against
registry.deckhouse.io/deckhouse/cewith the currently suspendedbetachannel:v1.75.6v1.76.3(beta's current version) without--ignore-suspend