Skip to content

openshift: fix tag trailing zero for X.0 versions#875

Open
SchSeba wants to merge 1 commit into
karmab:mainfrom
SchSeba:fix-ocp-version-tag-trailing-zero
Open

openshift: fix tag trailing zero for X.0 versions#875
SchSeba wants to merge 1 commit into
karmab:mainfrom
SchSeba:fix-ocp-version-tag-trailing-zero

Conversation

@SchSeba

@SchSeba SchSeba commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

When YAML parses a tag like 5.0, it becomes the float 5.0.
The existing code appends a trailing zero to single-digit minor
versions (e.g. 4.1 -> 4.10) since YAML strips the trailing zero.
However, this incorrectly converts 5.0 to 5.00, causing URL
lookups to fail with:

Couldn't open url https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp-dev-preview/candidate-5.00/release.txt

Skip the trailing zero append when the minor version is 0, since
X.0 is a valid version and X.00 does not exist.

Signed-off-by: Sebastian Sch sebassch@gmail.com

When YAML parses a tag like 5.0, it becomes the float 5.0.
The existing code appends a trailing zero to single-digit minor
versions (e.g. 4.1 -> 4.10) since YAML strips the trailing zero.
However, this incorrectly converts 5.0 to 5.00, causing URL
lookups to fail with:

Couldn't open url https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp-dev-preview/candidate-5.00/release.txt

Skip the trailing zero append when the minor version is 0, since
X.0 is a valid version and X.00 does not exist.

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant