operator-sdk icon indicating copy to clipboard operation
operator-sdk copied to clipboard

fix: consider version when getting CRDs for validating descriptors

Open tthvo opened this issue 7 months ago • 4 comments

Description of the change:

An additional condition is included for matching apiVersion of example CRs with CRD version when searching for the CRD in the CSV.

Motivation for the change:

Previously, the olm-spec-descriptors scorecard test failed when multiple versions of CRD are included in the CSV. The CRs specified in alm-examples annotations are validated only against the first matched CRD (by kind), which is incorrect. This ensures the CRD with correct kind and version is selected for descriptor scorecard test.

Checklist

If the pull request includes user-facing changes, extra documentation is required:

Fixes #6781

tthvo avatar Jul 15 '24 10:07 tthvo