8000 Use envtest for CRD validation tests by rikatz · Pull Request #3948 · kubernetes-sigs/gateway-api · GitHub
[go: up one dir, main page]

Skip to content

Conversation

rikatz
Copy link
Member
@rikatz rikatz commented Jul 23, 2025

What type of PR is this?
/kind test

What this PR does / why we need it: This change does multiple improvements on CEL validation tests:

  • Uses controller-runtime envtest to setup an environment, in case a Kubernetes cluster is not available
  • Uses Github Actions + matrix to test the combinations of Kubernetes Versions and CRD channels

With this change, the execution time falls from 8 minutes to ~45s, while keeping the desired k8s matrix also on the Github Action configuration

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/test do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 23, 2025
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 23, 2025
@rikatz
Copy link
Member Author
rikatz commented Jul 23, 2025

/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 23, 2025
@rikatz rikatz force-pushed the use-envtest-for-cel-test branch from b6b5faf to a428bc8 Compare July 23, 2025 14:54
@rikatz rikatz force-pushed the use-envtest-for-cel-test branch from a428bc8 to 7cc8702 Compare July 23, 2025 14:56
@shaneutt shaneutt self-requested a review July 23, 2025 15:45
@rikatz rikatz changed the title [DRAFT] Use envtest for cel validation test Use envtest for CRD validation tests Jul 23, 2025
@rikatz
Copy link
Member Author
rikatz commented Jul 23, 2025

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 23, 2025
@rikatz rikatz force-pushed the use-envtest-for-cel-test branch from 66ca898 to 9815758 Compare July 23, 2025 17:46
@rikatz
Copy link
Member Author
rikatz commented Jul 23, 2025

TODO:

If/once we accept this PR, we can remove the Prow jobs for CRD validation from kubernetes/test-infra repo.

@youngnick
Copy link
Contributor

Wow, this is a great change, thanks @rikatz!

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 24, 2025
@robscott
Copy link
Member

This is a huge improvement, thanks @rikatz! Just ping for LGTM once presubmits/linting passes.

/approve

Copy link
Member
@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

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

Legit, very helpful thank you Ricardo! Once passing 👍

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rikatz, robscott, shaneutt, youngnick

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [robscott,shaneutt,youngnick]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shaneutt shaneutt added this to the v1.4.0 milestone Jul 24, 2025
@shaneutt shaneutt self-assigned this Jul 24, 2025
@rikatz rikatz force-pushed the use-envtest-for-cel-test branch from 9815758 to 97469f8 Compare July 24, 2025 20:02
@rikatz rikatz force-pushed the use-envtest-for-cel-test branch from 97469f8 to 85b1641 Compare July 24, 2025 20:31
@robscott
Copy link
Member

This is great, thanks @rikatz!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 24, 2025
@k8s-ci-robot k8s-ci-robot merged commit cb2d8f1 into kubernetes-sigs:main Jul 24, 2025
24 checks passed
@github-project-automation github-project-automation bot moved this from Review to Done in Release v1.4.0 Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/test lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants
0