Skip to content

Conversation

rioliu-rh
Copy link
Contributor

@rioliu-rh rioliu-rh commented Oct 12, 2025

The WithoutKubeconf method was previously a no-op but now properly clears the configPath field to ensure OTP compatibility. This change makes the method functional by actually removing kubeconfig references when called, aligning with OTP's expected behavior.

link jira ticket https://issues.redhat.com/browse/OCPERT-173

The WithoutKubeconf method was previously a no-op but now properly
clears the configPath field to ensure OTP compatibility. This change
makes the method functional by actually removing kubeconfig references
when called, aligning with OTP's expected behavior.
@openshift-ci openshift-ci bot requested review from deads2k and p0lyn0mial October 12, 2025 05:33
@rioliu-rh
Copy link
Contributor Author

/cc @kasturinarra @nidangavali

@rioliu-rh rioliu-rh changed the title OCPERT-173 implement WithoutKubeconf method to clear config path NO-JIRA: implement WithoutKubeconf method to clear config path Oct 12, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 12, 2025
@openshift-ci-robot
Copy link

@rioliu-rh: This pull request explicitly references no jira issue.

In response to this:

The WithoutKubeconf method was previously a no-op but now properly clears the configPath field to ensure OTP compatibility. This change makes the method functional by actually removing kubeconfig references when called, aligning with OTP's expected behavior.

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.

@rioliu-rh
Copy link
Contributor Author

add a dummy test case in oc mirror test file

	g.It("OCPERT-173 Test oc cli w/o kubeconfig", func() {
		output, err := oc.WithoutNamespace().WithoutKubeconf().Run("mirror").Args("--help").Output()
		fmt.Println(output)
		o.Expect(err).NotTo(o.HaveOccurred())
	})

From the test log, I can see no option kubeconfig used in command line

./bin/extended-platform-tests run all --dry-run | grep 'OCPERT-173' | ./bin/extended-platform-tests run -f -
  I1012 13:29:11.434122 98720 test.go:180] Found authentication type used:
  I1012 13:29:11.436040 98720 test_context.go:566] The --provider flag is not set. Continuing as if --provider=skeleton had been used.
  I1012 13:29:12.453607 98720 client.go:1023] Running 'oc --kubeconfig=/Users/rio.liu/.kube/config get node -l node-role.kubernetes.io/worker -o=jsonpath={.items[*].metadata.name}'
  I1012 13:29:13.794523 98720 api.go:57] EnvIsKubernetesCluster = no, start monitoring ClusterOperators and ClusterVersions
started: (0/1/1) "[sig-cli] Workloads ocmirror v2 works well OCPERT-173 Test oc cli w/o kubeconfig"

  I1012 13:29:18.058237 98742 openshift-tests.go:203] Is kubernetes cluster: no, is external OIDC cluster: no
  I1012 13:29:18.058565 98742 test_context.go:566] The --provider flag is not set. Continuing as if --provider=skeleton had been used.
  I1012 13:29:18.337766 98742 client.go:1023] Running 'oc --kubeconfig=/Users/rio.liu/.kube/config get node -l node-role.kubernetes.io/worker -o=jsonpath={.items[*].metadata.name}'
  [1760246953] openshift extended e2e - 1/1 specs I1012 13:29:23.443489 98742 client.go:288] configPath is now "/var/folders/pk/ntb29tq142l2dm5899xcc4yh0000gn/T/configfile1807036034"
  I1012 13:29:23.443557 98742 client.go:363] The user is now "e2e-test-ocmirrorv2-jzbkh-user"
  I1012 13:29:23.443573 98742 client.go:365] Creating project "e2e-test-ocmirrorv2-jzbkh"
  I1012 13:29:23.716696 98742 client.go:373] Waiting on permissions in project "e2e-test-ocmirrorv2-jzbkh" ...
  I1012 13:29:24.631383 98742 client.go:402] DeploymentConfig capability is enabled, adding 'deployer' SA to the list of default SAs
  I1012 13:29:24.855189 98742 client.go:417] Waiting for ServiceAccount "default" to be provisioned...
  I1012 13:29:25.395136 98742 client.go:417] Waiting for ServiceAccount "builder" to be provisioned...
  I1012 13:29:25.937395 98742 client.go:417] Waiting for ServiceAccount "deployer" to be provisioned...
  I1012 13:29:26.465813 98742 client.go:427] Waiting for RoleBinding "system:image-pullers" to be provisioned...
  I1012 13:29:26.888882 98742 client.go:427] Waiting for RoleBinding "system:image-builders" to be provisioned...
  I1012 13:29:27.315521 98742 client.go:427] Waiting for RoleBinding "system:deployers" to be provisioned...
  I1012 13:29:28.272417 98742 client.go:460] Project "e2e-test-ocmirrorv2-jzbkh" has been fully provisioned.
  I1012 13:29:28.272895 98742 client.go:1023] Running 'oc mirror --help'
  I1012 13:29:28.360559 98742 client.go:1081] Error running oc mirror --help:
  StdOut>
  exec format error
  StdErr>
  exec format error

exec format error
  I1012 13:29:28.802213 98742 resource.go:168] POD  NODE  PHASE  GRACE  CONDITIONS
  I1012 13:29:28.802462 98742 resource.go:178]
  I1012 13:29:29.466629 98742 dump.go:81] skipping dumping cluster info - cluster too large
  I1012 13:29:29.687415 98742 client.go:676] Deleted {user.openshift.io/v1, Resource=users  e2e-test-ocmirrorv2-jzbkh-user}, err: <nil>
  I1012 13:29:29.905234 98742 client.go:676] Deleted {oauth.openshift.io/v1, Resource=oauthclients  e2e-client-e2e-test-ocmirrorv2-jzbkh}, err: <nil>
  I1012 13:29:30.125250 98742 client.go:676] Deleted {oauth.openshift.io/v1, Resource=oauthaccesstokens  sha256~6OZ0oFCRI5uXVO0Mjo-NvuL_070jRHANi0NuuPNrTHA}, err: <nil>

error message exec format error is expected, because plugin binary is not compatible with arm64 platform

@rioliu-rh
Copy link
Contributor Author

/verified by @rioliu-rh

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Oct 12, 2025
@openshift-ci-robot
Copy link

@rioliu-rh: This PR has been marked as verified by @rioliu-rh.

In response to this:

/verified by @rioliu-rh

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.

@rioliu-rh
Copy link
Contributor Author

/assign @stbenjam

@stbenjam
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2025
Copy link
Contributor

openshift-ci bot commented Oct 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rioliu-rh, stbenjam

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 6d741de and 2 for PR HEAD 6f52660 in total

Copy link
Contributor

openshift-ci bot commented Oct 13, 2025

@rioliu-rh: all tests passed!

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.

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants