e2e: fetch and version-sort github releases to get latest release.
Our method of querying github.com/$repo/releases/latest to determine the latest release of containerd, CRI-O or kubernetes is unasafe. The semantics of 'latest' is up to the package maintainer. Since errors happen, we can end up picking and trying to use a too old version. So instead, list releases and version-sort them to find the latest one.
Ideally we would use the official github API to list all tagged releases not marked as a prerelease, and pick the latest one by tag. However, without authenticating that API is severly rate limited and fails often from behind busy proxies. So instead, fetch pages of releases, parse them for release URLs, sort them by version and pick the
BTW: There are probably plenty of more low hanging fruits to fix/improve on this front. For instance, I just noticed that the scripts determine the latest runtime and K8s release (thus accessing and fetching plenty of data from github) for every single test we run. Since these cannot really change once the test VM has been provisioned it would be better to determine the versions once then store them under the test VM directory in case they are needed for further, version-specific test scripting logic.
BTW: There are probably plenty of more low hanging fruits to fix/improve on this front. For instance, I just noticed that the scripts determine the latest runtime and K8s release (thus accessing and fetching plenty of data from github) for every single test we run. Since these cannot really change once the test VM has been provisioned it would be better to determine the versions once then store them under the test VM directory in case they are needed for further, version-specific test scripting logic.
This is now addressed in #324, which is stacked on top of this PR.