Skip to content

Fix API resource discovery to properly parse GroupVersion#259

Open
leo8a wants to merge 2 commits intoopenshift:mainfrom
leo8a:fix-api-resource-discovery
Open

Fix API resource discovery to properly parse GroupVersion#259
leo8a wants to merge 2 commits intoopenshift:mainfrom
leo8a:fix-api-resource-discovery

Conversation

@leo8a
Copy link

@leo8a leo8a commented Feb 7, 2026

The getSupportedResourceTypes function was attempting to access res.Group and res.Version fields that don't exist on APIResource. The group and version are part of the APIResourceList, not the individual resources.

This fix parses the GroupVersion from list.GroupVersion and applies it to all resources in that list, resolving the "missing group/version" warnings for cluster-scoped resources like Config, OperatorGroup, etc.

W0207 12:33:16.790217 1414541 compare.go:547] There may be an issue with the API resources exposed by the cluster. Found kind but missing group/version for Config.imageregistry.operator.openshift.io/v1, DataScienceCluster.datasciencecluster.opendatahub.io/v1, DeviceConfig.amd.com/v1alpha1, HardwareProfile.infrastructure.opendatahub.io/v1alpha1, LVMCluster.lvm.topolvm.io/v1alpha1, MachineConfig.machineconfiguration.openshift.io/v1, NodeFeatureDiscovery.nfd.openshift.io/v1, OperatorGroup.operators.coreos.com/v1, StorageClass.storage.k8s.io/v1, Subscription.operators.coreos.com/v1alpha1 

Signed-off-by: Leonardo Ochoa-Aday lochoa@redhat.com

The getSupportedResourceTypes function was attempting to access
res.Group and res.Version fields that don't exist on APIResource.
The group and version are part of the APIResourceList, not the
individual resources.

This fix parses the GroupVersion from list.GroupVersion and applies
it to all resources in that list, resolving the "missing group/version"
warnings for cluster-scoped resources like Config, OperatorGroup, etc.

Signed-off-by: Leonardo Ochoa-Aday <lochoa@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Feb 7, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign natifridman for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@leo8a
Copy link
Author

leo8a commented Feb 7, 2026

/cc @lack

@openshift-ci openshift-ci bot requested a review from lack February 7, 2026 11:37
Update test discovery client to properly group resources by GroupVersion
and set the GroupVersion field on each APIResourceList. This matches real
Kubernetes API behavior where resources are returned in separate lists per
group/version.

This fixes the test failures caused by the API resource discovery fix and
eliminates duplicate resource counting (27 down to 14 unique resources).

Signed-off-by: Leonardo Ochoa-Aday <lochoa@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Feb 7, 2026

@leo8a: The following test 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/golint c432395 link true /test golint

Full PR test history. Your PR dashboard.

Details

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant