-
Notifications
You must be signed in to change notification settings - Fork 1.6k
✨ feat(makefile): add setup test e2e targets #4876
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
base: master
Are you sure you want to change the base?
✨ feat(makefile): add setup test e2e targets #4876
Conversation
Introduce optional targets to be executed after setting up the Kind cluster and before running e2e tests. This allows for additional customization and setup steps to be included in the e2e test workflow.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kersten The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @kersten. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@@ -71,6 +71,9 @@ test: manifests generate fmt vet setup-envtest ## Run tests. | |||
# - CERT_MANAGER_INSTALL_SKIP=true | |||
KIND_CLUSTER ?= project-test-e2e | |||
|
|||
# Optional targets to run after setting up Kind cluster and before running e2e tests | |||
SETUP_TEST_E2E_TARGETS ?= |
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.
Thank you for this contribution 🥇
But let's check the motivation:
By introducing the SETUP_TEST_E2E_TARGETS variable, users gain the flexibility to define and run one or more prerequisite targets prior to cluster setup and test execution. This change:
Do we have any prerequisites in the default scaffold?
Currently, the test-e2e target in the Kubebuilder Makefile template hardcodes a single workflow: setup the Kind cluster and immediately run the end-to-end tests. This prevents projects from injecting any preparatory steps - such as installing CRDs, operators, or other third-party dependencies - before executing the actual tests.
The key question here is: Do we need to support this in the default scaffold?
I would argue no. This kind of setup is only necessary in customised use cases. If someone chooses to modify the default scaffold to accommodate these advanced workflows, they can and should customise the Makefile accordingly as well.
In other words, we shouldn’t change the default scaffold to support edge-case scenarios that are irrelevant to the standard use case. Doing so introduces unnecessary complexity and maintenance burden, with features that don’t offer value to the common path.
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.
/hold for we discuss the need and motivations ^
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Currently, the test-e2e target in the Kubebuilder Makefile template hardcodes a single workflow: setup the Kind cluster and immediately run the end-to-end tests. This prevents projects from injecting any preparatory steps - such as installing CRDs, operators, or other third-party dependencies - before executing the actual tests.
By introducing the SETUP_TEST_E2E_TARGETS variable, users gain the flexibility to define and run one or more prerequisite targets prior to cluster setup and test execution. This change: