Skip to content

OCPBUGS-55317: Skip GatewayAPIController tests on clusters without OLM capabilities #29784

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

Merged

Conversation

alebedev87
Copy link
Contributor

@alebedev87 alebedev87 commented May 12, 2025

This ensures GatewayAPIController tests are only run on clusters where OLM and related capabilities are enabled.

@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels May 12, 2025
@openshift-ci-robot
Copy link

@alebedev87: This pull request references Jira Issue OCPBUGS-55317, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.0) matches configured target version for branch (4.20.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This ensures GatewayAPIController tests are only run on clusters where OLM and related capabilities are available.

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.

@openshift-ci openshift-ci bot requested review from gcs278 and miheer May 12, 2025 16:20
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 12, 2025
@alebedev87
Copy link
Contributor Author

/payload-job periodic-ci-openshift-release-master-ci-4.19-e2e-aws-ovn-no-capabilities

Copy link
Contributor

openshift-ci bot commented May 12, 2025

@alebedev87: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-ci-4.19-e2e-aws-ovn-no-capabilities

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/6911e800-2f6c-11f0-94f5-699a0e37bf68-0

@lihongan
Copy link
Contributor

/payload-job-with-prs periodic-ci-openshift-release-master-ci-4.20-e2e-aws-ovn-no-capabilities openshift/cluster-ingress-operator#1232

The test needs CIO PR#1232 otherwise installer step is failing

Copy link
Contributor

openshift-ci bot commented May 13, 2025

@lihongan: An error was encountered. No known errors were detected, please see the full error message for details.

Full error message. unable to get additional pr info from string: failing: string: failing doesn't match expected format: org/repo#number

Please contact an administrator to resolve this issue.

@lihongan
Copy link
Contributor

/payload-job-with-prs periodic-ci-openshift-release-master-ci-4.20-e2e-aws-ovn-no-capabilities openshift/cluster-ingress-operator#1232

Copy link
Contributor

openshift-ci bot commented May 13, 2025

@lihongan: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-ci-4.20-e2e-aws-ovn-no-capabilities

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/20550170-2fc5-11f0-9635-4ac681776cf3-0

@alebedev87
Copy link
Contributor Author

alebedev87 commented May 13, 2025

Analysis of /payload-job periodic-ci-openshift-release-master-ci-4.19-e2e-aws-ovn-no-capabilities:

The installation failed because of the ingress operator which didn't become ready due to this error (log file):

2025-05-12T22:36:07.927Z	ERROR	operator.main	cobra/command.go:1019	error starting	{"error": "failed to wait for status_controller caches to sync kind source: *v1alpha1.Subscription: timed out waiting for cache to be synced for Kind *v1alpha1.Subscription"}

Ingress capability is implicitly added at the installation. So, the install will keep failing until the fix is merged.

@alebedev87
Copy link
Contributor Author

Analysis of /payload-job-with-prs periodic-ci-openshift-release-master-ci-4.20-e2e-aws-ovn-no-capabilities https://github.com/openshift/cluster-ingress-operator/pull/1232:

The installation failed because the ingress operator didn't become ready due to this error (log file):

2025-05-13T08:01:08.355Z	ERROR	operator.init	controller/controller.go:288	Reconciler error	{"controller": "status_controller", "object": {"name":"default","namespace":"openshift-ingress-operator"}, "namespace": "openshift-ingress-operator", "name": "default", "reconcileID": "0dafe498-5912-4edb-9bdb-9c52c632a9c7", "error": "failed to get operator state: failed to get subscription \"openshift-operators/servicemeshoperator3\": failed to get restmapping: no matches for kind \"Subscription\" in version \"operators.coreos.com/v1alpha1\""}

Ingress capability is implicitly added at the installation. The fix PR needs to address this comment to avoid this error.

@Miciah
Copy link
Contributor

Miciah commented May 13, 2025

/assign

@candita
Copy link
Contributor

candita commented May 13, 2025

/assign

@Miciah
Copy link
Contributor

Miciah commented May 13, 2025

There is an IsCapabilityEnabled helper:

func IsCapabilityEnabled(oc *CLI, cap configv1.ClusterVersionCapability) (bool, error) {
cv, err := oc.AdminConfigClient().ConfigV1().ClusterVersions().Get(context.Background(), "version", metav1.GetOptions{})
if err != nil {
return false, err
}
for _, capability := range cv.Status.Capabilities.EnabledCapabilities {
if capability == cap {
return true, nil
}
}
return false, nil
}

There are also several SkipIf... helpers defined in the same file. It is worth considering defining a helper there, to make this test a little shorter and to provide something that could be re-used in other tests (we have a lot of duplicated logic as it is).

@alebedev87 alebedev87 force-pushed the skip-gwapi-ctrl-olm-cap branch from eaa5bec to 96d8fad Compare May 14, 2025 13:47
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 14, 2025
@alebedev87 alebedev87 force-pushed the skip-gwapi-ctrl-olm-cap branch from 96d8fad to b103c35 Compare May 14, 2025 13:48
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 14, 2025
@openshift-ci openshift-ci bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 14, 2025
@alebedev87
Copy link
Contributor Author

@Miciah: I added test helper functions in a separate commit, PTAL.

@Miciah
Copy link
Contributor

Miciah commented May 14, 2025

Thanks!

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 14, 2025
@knobunc knobunc added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 14, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 07c5e03 and 2 for PR HEAD b103c35 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 3bfea73 and 1 for PR HEAD b103c35 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 3bfea73 and 2 for PR HEAD b103c35 in total

@alebedev87
Copy link
Contributor Author

alebedev87 commented May 15, 2025

e2e-aws-ovn-serial-publicnet is permafailing since its creation.

Upd: it should have been optional.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD e53a2eb and 1 for PR HEAD b103c35 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD d03198f and 0 for PR HEAD b103c35 in total

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 15, 2025
…M capabilities

This ensures GatewayAPIController tests are only run on clusters
where OLM and related capabilities are enabled.
@alebedev87 alebedev87 force-pushed the skip-gwapi-ctrl-olm-cap branch from b103c35 to a136628 Compare May 16, 2025 08:48
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 16, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 16, 2025
@lihongan
Copy link
Contributor

/payload-job-with-prs periodic-ci-openshift-release-master-ci-4.20-e2e-aws-ovn-no-capabilities

Copy link
Contributor

openshift-ci bot commented May 16, 2025

@lihongan: it appears that you have attempted to use some version of the payload command, but your comment was incorrectly formatted and cannot be acted upon. See the docs for usage info.

@lihongan
Copy link
Contributor

/payload-job periodic-ci-openshift-release-master-ci-4.20-e2e-aws-ovn-no-capabilities

Copy link
Contributor

openshift-ci bot commented May 16, 2025

@lihongan: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-ci-4.20-e2e-aws-ovn-no-capabilities

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/ef1786b0-3234-11f0-8b29-64f1810bd52a-0

@alebedev87
Copy link
Contributor Author

Rebased due to a merge conflict with #29697.

@lihongan
Copy link
Contributor

/lgtm

payload job -no-capabilities install succeed and the 5 tests are skipped, e.g.

: [sig-network-edge][OCPFeatureGate:GatewayAPIController][Feature:Router][apigroup:gateway.networking.k8s.io] Ensure default gatewayclass is accepted [Suite:openshift/conformance/parallel]

Reason: skip [github.com/openshift/origin/test/extended/util/framework.go:2449]: Skip this test scenario because not all of the following capabilities are enabled: [marketplace OperatorLifecycleManager] Ginkgo exit error 3: exit with code 3

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

openshift-ci bot commented May 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: alebedev87, lihongan, Miciah

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

Copy link
Contributor

openshift-ci bot commented May 16, 2025

@alebedev87: 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/e2e-aws-ovn-image-registry 96d8fad link true /test e2e-aws-ovn-image-registry
ci/prow/e2e-metal-ipi-serial a136628 link false /test e2e-metal-ipi-serial
ci/prow/4.12-upgrade-from-stable-4.11-e2e-aws-ovn-upgrade-rollback a136628 link false /test 4.12-upgrade-from-stable-4.11-e2e-aws-ovn-upgrade-rollback
ci/prow/e2e-azure-ovn-etcd-scaling a136628 link false /test e2e-azure-ovn-etcd-scaling
ci/prow/e2e-aws-disruptive a136628 link false /test e2e-aws-disruptive
ci/prow/okd-e2e-gcp a136628 link false /test okd-e2e-gcp
ci/prow/e2e-openstack-serial a136628 link false /test e2e-openstack-serial
ci/prow/e2e-aws-ovn-serial-publicnet a136628 link false /test e2e-aws-ovn-serial-publicnet
ci/prow/e2e-gcp-fips-serial a136628 link false /test e2e-gcp-fips-serial
ci/prow/e2e-gcp-disruptive a136628 link false /test e2e-gcp-disruptive
ci/prow/okd-scos-e2e-aws-ovn a136628 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-aws-ovn-etcd-scaling a136628 link false /test e2e-aws-ovn-etcd-scaling
ci/prow/e2e-vsphere-ovn-dualstack-primaryv6 a136628 link false /test e2e-vsphere-ovn-dualstack-primaryv6
ci/prow/e2e-aws-ovn-single-node-upgrade a136628 link false /test e2e-aws-ovn-single-node-upgrade
ci/prow/e2e-azure-ovn-upgrade a136628 link false /test e2e-azure-ovn-upgrade
ci/prow/e2e-vsphere-ovn-etcd-scaling a136628 link false /test e2e-vsphere-ovn-etcd-scaling
ci/prow/e2e-gcp-ovn-etcd-scaling a136628 link false /test e2e-gcp-ovn-etcd-scaling

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 6e36cd5 into openshift:main May 16, 2025
39 of 55 checks passed
@openshift-ci-robot
Copy link

@alebedev87: Jira Issue OCPBUGS-55317 is in an unrecognized state (Verified) and will not be moved to the MODIFIED state.

In response to this:

This ensures GatewayAPIController tests are only run on clusters where OLM and related capabilities are enabled.

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.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: openshift-enterprise-tests
This PR has been included in build openshift-enterprise-tests-container-v4.20.0-202505161911.p0.g6e36cd5.assembly.stream.el9.
All builds following this will include this PR.

@alebedev87
Copy link
Contributor Author

/cherry-pick release-4.19

@openshift-cherrypick-robot

@alebedev87: #29784 failed to apply on top of branch "release-4.19":

Applying: Add test helpers to check if cluster capabilities are enabled and skip accordingly
Applying: OCPBUGS-55317: Skip GatewayAPIController tests on clusters without OLM capabilities
Using index info to reconstruct a base tree...
M	test/extended/router/gatewayapicontroller.go
Falling back to patching base and 3-way merge...
Auto-merging test/extended/router/gatewayapicontroller.go
CONFLICT (content): Merge conflict in test/extended/router/gatewayapicontroller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0002 OCPBUGS-55317: Skip GatewayAPIController tests on clusters without OLM capabilities

In response to this:

/cherry-pick release-4.19

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. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants