Cluster-api: Can't install pre-release providers from repo with no "latest" release.

Created on 18 Aug 2020  路  5Comments  路  Source: kubernetes-sigs/cluster-api

What steps did you take and what happened:

Using the talos bootstrap provider, I'm seeing this when trying to install a pre-release from the repo with no "latest" release. (as in, no non-prereleases in the repo)

$ ./bin/clusterctl init -b "talos:v0.2.0-alpha.0" -c "-" -i "-"
Fetching providers
Error: failed to get provider components for the "talos:v0.2.0-alpha.0" provider: failed to get repository client for the BootstrapProvider with name talos: error creating the GitHub repository client: failed to get GitHub latest version: failed to find releases tagged with a valid semantic version number

This occurs because https://github.com/kubernetes-sigs/cluster-api/blob/38810211da3f71dd3ce61d9f1fa85a690dd98790/cmd/clusterctl/client/repository/repository_github.go#L161 gets called any time a github repository is created from the newGithubRepository function. I _think_ we should provide some way to say "don't bother looking up latest" in the newGithubRepository function if a version tag is specified.

What did you expect to happen:
clusterctl init -b "talos:v0.2.0-alpha.0" works as expected by installing a snazzy talos bootstrap provider of the given version.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Totally understand that this probably isn't a widespread problem, but it'll break the built in talos providers. It just doesn't line up with our release cadence on the providers and we haven't gotten to a point where we're comfortable with releasing a GA release of these.

/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]

kinbug lifecyclactive

Most helpful comment

@fabriziopandini That would work even better for us honestly.

All 5 comments

/assign @wfernandes

Wondering if a possible solution is to get getLatestRelease to fall back in reading pre-release if no official latest exists

Nb. this should cover the "no release exists yet use case", after this point we go back to install official release by default (while pre-releases should be explicitly requested)

@fabriziopandini That would work even better for us honestly.

/milestone v0.3.9

/assign @rsmitty
/lifecycle active

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oneilcin picture oneilcin  路  6Comments

gyliu513 picture gyliu513  路  6Comments

dlipovetsky picture dlipovetsky  路  5Comments

fabriziopandini picture fabriziopandini  路  5Comments

wfernandes picture wfernandes  路  5Comments