Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Better error message when metadata.yaml might be out of date. #11959

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/clusterctl/client/repository/repository_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func latestPatchRelease(ctx context.Context, repo Repository, major, minor *int3
}

if len(versionCandidates) == 0 {
return "", errors.New("failed to find releases tagged with a valid semantic version number")
return "", errors.New("failed to find releases tagged with a valid semantic version number (metadata.yaml up-to-date?)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not always out of date, it could be simply that this provider version is not compatible with the chosen capi version.

I'd guess the metadata misses the version thing only happens in one of these three cases? and the message might be misleading in the two cases where we would return it but its unrelated?!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are new to that, then it is likely that you do not know about metadata.yaml.

What about just adding (metadata.yaml)?

But overall it is now no longer very important for me. I just care for other people which are new to that topic.

We can close the PR, if we do not find a simple solution. Maybe this PR (even it is just closed and not merged) helps people to find the right answer :-)

}

// Sort parsed versions by semantic version order.
Expand Down Expand Up @@ -149,5 +149,5 @@ func latestPatchRelease(ctx context.Context, repo Repository, major, minor *int3
}

// If we reached this point, it means we didn't find any release.
return "", errors.New("failed to find releases tagged with a valid semantic version number")
return "", errors.New("failed to find releases tagged with a valid semantic version number (metadata.yaml up-to-date?)")
}
2 changes: 1 addition & 1 deletion test/framework/clusterctl/e2e_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func resolveReleaseMarker(ctx context.Context, releaseMarker string, goproxyClie
}

// If we reached this point, it means we didn't find any release.
return "", errors.New("failed to find releases tagged with a valid semantic version number")
return "", errors.New("failed to find releases tagged with a valid semantic version number (metadata.yaml up-to-date?)")
}

var (
Expand Down
Loading