-
Notifications
You must be signed in to change notification settings - Fork 31
NO-ISSUE: UPSTREAM: <carry>: check kubeconfig only run-test and run-suite #507
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
Conversation
@kuiwang02: This pull request explicitly references no jira issue. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kuiwang02, tmshort 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:
Approvers can indicate their approval by writing |
/verify by @kuiwang02 |
/verified by @kuiwang02 |
@kuiwang02: This PR has been marked as verified by In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
@kuiwang02: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
56bd7cf
into
openshift:main
Only require KUBECONFIG for run-suite and run-test commands
Problem
Previously, the olmv1-tests-ext binary required the KUBECONFIG environment variable to be set for all subcommands, including those that don't
interact with a cluster (like list, info, images, update, completion, and help). This was due to an init() function in
test/qe/util/framework.go that checked KUBECONFIG during package initialization and exited immediately if it wasn't set.
Solution
This PR implements a targeted approach where only commands that actually need cluster access (run-suite and run-test) require KUBECONFIG:
Changes
Testing
Verified the following behavior:
✅ Commands that work WITHOUT KUBECONFIG:
$ unset KUBECONFIG
$ ./bin/olmv1-tests-ext list --help # ✓ Works
$ ./bin/olmv1-tests-ext info # ✓ Works
$ ./bin/olmv1-tests-ext images # ✓ Works
$ ./bin/olmv1-tests-ext completion bash # ✓ Works
❌ Commands that REQUIRE KUBECONFIG:
$ unset KUBECONFIG
$ ./bin/olmv1-tests-ext run-suite olmv1/parallel
Error: KUBECONFIG environment variable is not set.
Please set KUBECONFIG to point to your cluster configuration file.
Example: export KUBECONFIG=/path/to/kubeconfig
$ ./bin/olmv1-tests-ext run-test "test-name"
Error: KUBECONFIG environment variable is not set.
Please set KUBECONFIG to point to your cluster configuration file.
Example: export KUBECONFIG=/path/to/kubeconfig
Assisted-by: Claude Code
/cc @perdasilva