-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
docs: autogenerate tested k8s versions and centralize config #14176
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,6 +187,7 @@ liveness | |
localhost | ||
maxFailures | ||
maxSuccess | ||
md | ||
memoization | ||
memoized | ||
memoizing | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This page is populated for released Argo Workflows versions. Use the version selector to view this table for a specific version. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
# Loosely based on https://github.com/argoproj/argo-cd/blob/5b79c34c72300e6e2e6336051ce6992f6d54011c/hack/update-supported-versions.sh | ||
|
||
# Extract major/minor versions from branch name, e.g. "release-3.5" will become: | ||
# release- | ||
# 3 | ||
# 5 | ||
mapfile -t branch_parts < <(git rev-parse --abbrev-ref ${1:-HEAD} | grep -Eo '.*release-|[0-9]') | ||
|
||
if [[ -z "${branch_parts[@]}" ]]; then | ||
echo 'This page is populated for released Argo Workflows versions. Use the version selector to view this table for a specific version.' | ||
exit | ||
fi | ||
|
||
echo "The following table shows the versions of Kubernetes that are tested with each version of Argo Workflows." | ||
echo | ||
echo "| Argo Workflows version | Kubernetes versions |" | ||
echo "|------------------------|---------------------|" | ||
|
||
for n in 0 1 2; do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why iterate back like this at all? Why not force the user to look at the page for the version they are using instead? The table for other release numbers may be wrong as an update to k8s version may have occurred on their branch but a release not happened. If we cherry-pick this back to 3.5 then it will iterate back to 3.3 which is even more unsupported than 3.4, and at some point this breaks with a 4.0 release. And at 3.7 release 3.6 will continue to want to document 3.4. I'd rather we always displayed the "version selector" sentence, and just showed the current branch. We do lose the version information for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If a user is on an older Kubernetes version and they want to determine what version(s) of Argo Workflows they can use, then a table provides a better user experience than manually switching between versions. But that's probably not common enough to be worth the extra complexity, so I went ahead and rewrote this to only print a single sentence with the tested Kubernetes versions for the current version. That means |
||
new_version="${branch_parts[1]}.$((branch_parts[2] - n))" | ||
new_branch="${branch_parts[0]}${new_version}" | ||
k8s_versions=$(./hack/k8s-versions.sh "$new_branch" | paste -s | sed 's/\t/, /') | ||
echo "|$new_version|$k8s_versions|" | ||
done |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, I like this |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
# For the given revision, extract the Kubernetes versions tested in the | ||
# corresponding e2e-tests CI workflow definition. | ||
# This would be cleaner if we extracted the version data to a separate file, | ||
# but this script is used to generate the "Tested versions" table, so it needs | ||
# to be compatible with old release branches. | ||
git grep -Eh 'INSTALL_K3S_VERSION=|install_k3s_version:' "${1:-HEAD}" -- .github/workflows/ci-build.yaml | grep -o 'v[0-9\.]\+' | sort -u |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that we will only generate the table on releases? If that's the case should we manually add the matrix here until the next release is made?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, this file will be only be replaced with the table when the
Docs
workflow is run on release branches. But that doesn't make this message inaccurate, because the release branches will still have old docs containing theKubernetes Compatibility Matrix
table.Also, using the cherry-pick bot that @Joibel just added (#14151), it should be easy to cherry-pick this onto
release-3.6
.