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

Add v1.31, v1.30 to GHA matrix and use latest Kind k8s patch for each minor versions for e2e #8375

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

kaovilai
Copy link
Member

@kaovilai kaovilai commented Nov 6, 2024

Always test latest available patch version of each supported k8s version available in Kindest/node images.

ie. This adds v1.31, v1.30 to test matrix and upgrade patch versions for others. Removes v1.23 and v1.24.

        k8s:
-          - 1.23.17
-          - 1.24.17
           - 1.25.16
-          - 1.26.13
+          - 1.26.15
-          - 1.27.10
+          - 1.27.16
-          - 1.28.6
+          - 1.28.13
-          - 1.29.1
+          - 1.29.8
+          - 1.30.4
+          - 1.31.1

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #(issue)

Please indicate you've done the following:

@kaovilai
Copy link
Member Author

kaovilai commented Nov 6, 2024

/kind changelog-not-required

@github-actions github-actions bot added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Nov 6, 2024
@kaovilai kaovilai closed this Nov 6, 2024
@kaovilai kaovilai reopened this Nov 6, 2024
@kaovilai kaovilai changed the title Dynamic Kind Versions for e2e Add v1.31, v1.30 to GHA matrix and dynamically upgrade Kind k8s versions for e2e Nov 6, 2024
@kaovilai kaovilai force-pushed the run-e2e-latestk8s branch 2 times, most recently from 9d758e0 to 0aaf0bb Compare November 6, 2024 18:20
@kaovilai kaovilai marked this pull request as draft November 6, 2024 19:59
@kaovilai

This comment was marked as resolved.

@kaovilai

This comment was marked as resolved.

@kaovilai kaovilai marked this pull request as ready for review November 6, 2024 20:10
@github-actions github-actions bot requested a review from ywk253100 November 6, 2024 20:11
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.96%. Comparing base (8e23752) to head (f200f8f).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8375   +/-   ##
=======================================
  Coverage   58.96%   58.96%           
=======================================
  Files         367      367           
  Lines       38895    38895           
=======================================
  Hits        22933    22933           
  Misses      14500    14500           
  Partials     1462     1462           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kaovilai kaovilai changed the title Add v1.31, v1.30 to GHA matrix and dynamically upgrade Kind k8s versions for e2e Add v1.31, v1.30 to GHA matrix and use latest Kind k8s patch for each minor versions for e2e Nov 7, 2024
# everything excluding older tags below 1.23. limits needs to be high enough to cover all latest versions
# grep -E "v[1-9]\.(2[3-9]|[3-9][0-9])" filters for v1.23 to v9.99
run: |
echo "matrix={\"k8s\":$(wget -q -O - "https://hub.docker.com/v2/namespaces/kindest/repositories/node/tags?page_size=50" | grep -o '"name": *"[^"]*' | grep -o '[^"]*$' | grep -v -E "alpha|beta" | grep -E "v[1-9]\.(2[3-9]|[3-9][0-9])" | awk -F. '{if(!a[$1"."$2]++)print $1"."$2"."$NF}' | sort -r | sed s/v//g | jq -R -c -s 'split("\n")[:-1]')}" >> $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you give more explanation and comments to this piece of code awk -F. '{if(!a[$1"."$2]++)print $1"."$2"."$NF}'?

It's not easy to understand what it does.

Copy link
Contributor

Choose a reason for hiding this comment

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

Another comment is we don't need to support that much of the KinD versions.
I suggest to deprecate the testing of v1.23 and v1.24.

Copy link
Member Author

Choose a reason for hiding this comment

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

The awk removes older patches of the same release so only 1.30.1 runs, and not 1.30.0

Copy link
Contributor

Choose a reason for hiding this comment

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

can be a separate PR, but this file and .github/workflows/e2e-test-kind.yaml have a lot of duplication

It would be better to merge then together?

Copy link
Member Author

Choose a reason for hiding this comment

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

that's an opinionated change over existing content of this pr. I think that can be discussed/opened separately.

Copy link
Member Author

Choose a reason for hiding this comment

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

IIUC not combining jobs, just the workflow file right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Simplest change I think would be copying jobs.crd-check step to .github/workflows/e2e-test-kind.yaml

that would run pre steps (build-cli and setup-test-matrix) only once and crd-check and run-e2e-test would still run in parallel

Copy link
Member Author

Choose a reason for hiding this comment

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

+1

@kaovilai kaovilai force-pushed the run-e2e-latestk8s branch 2 times, most recently from eeb0d5e to e5ed0bb Compare November 8, 2024 14:08
blackpiglet
blackpiglet previously approved these changes Nov 11, 2024
Always test latest available patch version of each supported k8s version available in Kindest/node images.

ie. This adds v1.31, v1.30 to test matrix and upgrade patch versions for others.

Signed-off-by: Tiger Kaovilai <[email protected]>
Signed-off-by: Tiger Kaovilai <[email protected]>
@blackpiglet blackpiglet merged commit ec2013b into vmware-tanzu:main Nov 14, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants