Skip to content

Conversation

mpryc
Copy link
Contributor

@mpryc mpryc commented Aug 14, 2025

Use --client with kubectl oadp version in the CLI availability check to ensure it only reports the client version without attempting to connect to the cluster. This prevents errors when the velero namespace is not yet present during test setup.

The example error:
https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_oadp-operator/1897/pull-ci-openshift-oadp-operator-oadp-dev-4.19-e2e-test-cli-aws/1955901235508809728/artifacts/e2e-test-cli-aws/e2e/build-log.txt

@openshift-ci openshift-ci bot requested review from kaovilai and weshayutin August 14, 2025 09:59
Copy link

openshift-ci bot commented Aug 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mpryc

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 Aug 14, 2025
Use `--client-only` with `kubectl oadp version` in the CLI
availability check to ensure it only reports the client
version without attempting to connect to the cluster.

Signed-off-by: Michal Pryc <[email protected]>
@mpryc mpryc force-pushed the fix-oadp-cli-check branch from cbf5124 to 8de0f08 Compare August 14, 2025 12:22
@@ -198,7 +198,7 @@ var _ = ginkgo.Describe("Backup and restore tests via OADP CLI", ginkgo.Label("c
ginkgo.BeforeAll(func() {
// Verify OADP CLI is available (should be installed in Docker image)
log.Print("Verifying OADP CLI is available...")
cmd := exec.Command("kubectl", "oadp", "version")
cmd := exec.Command("kubectl", "oadp", "version", "--client-only")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's how currently oadp client is implemented but IMO the flag should be --client to match what is in the kubectl:

https://kubernetes.io/docs/reference/kubectl/#operations

Copy link
Member

Choose a reason for hiding this comment

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

It's more a parallel to how velero CLI is doing, not exactly kubectl

Copy link
Member

Choose a reason for hiding this comment

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

I think keep it same as velero CLI, and propose velero CLI upstream match kubectl in the future.

Copy link

openshift-ci bot commented Aug 14, 2025

@mpryc: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/4.20-e2e-test-hcp-aws 8de0f08 link false /test 4.20-e2e-test-hcp-aws
ci/prow/4.19-e2e-test-cli-aws 8de0f08 link true /test 4.19-e2e-test-cli-aws
ci/prow/4.19-e2e-test-hcp-aws 8de0f08 link true /test 4.19-e2e-test-hcp-aws

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.

@kaovilai kaovilai requested a review from Joeavaikath August 14, 2025 18:45
@kaovilai
Copy link
Member

kaovilai commented Aug 14, 2025

From reviewing recent CLI e2e PR, failures are from a path issue and solved in #1899. Even with velero version trying to connect to server, it is only printing as error, but is not the root cause of recent cli CI failures.

We can leave this PR open for discussion if we rather this check be purely client-only for cleaner logs/semantics.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 16, 2025
@openshift-merge-robot
Copy link

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.

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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants