Skip to content
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

operator: image bundle < 1000 references test #2549

Conversation

sebrandon1
Copy link
Member

Adds a test for operator image bundles. They must have a bundleCount less than 1000 images. This is new from the v1.6 document.

@sebrandon1 sebrandon1 self-assigned this Nov 6, 2024
@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch from b5cac8e to 44b1993 Compare November 6, 2024 21:35
@dcibot
Copy link
Collaborator

dcibot commented Nov 6, 2024

Copy link
Collaborator

@ramperher ramperher left a comment

Choose a reason for hiding this comment

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

I guess you need to update CATALOG.md too, right?

@dcibot
Copy link
Collaborator

dcibot commented Nov 7, 2024

@ramperher
Copy link
Collaborator

from change #2549:

I tried this new test in our operator-based workload but it's skipped, it complains that no catalog source is found:

[DEBUG] [Nov  7 09:59:55.593] [checksgroup.go: 158] GROUP operator - Running beforeEach for check operator-operator-bundle-count
[INFO] [Nov  7 09:59:55.593] [checksgroup.go: 83] [operator-operator-bundle-count] Skipping check operator-operator-bundle-count, reason: no catalog sources found
[DEBUG] [Nov  7 09:59:55.593] [checksgroup.go: 182] GROUP operator - Running afterEach for check operator-operator-bundle-count

However, all the other operator tests are passing:

[INFO] [Nov  7 09:59:55.593] [checksgroup.go: 412] Recording checks results of group operator
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-install-status-succeeded] Recording result "PASSED", claimID: {Id:operator-install-status-succeeded Suite:operator Tags:common}
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-install-status-no-privileges] Recording result "FAILED", claimID: {Id:operator-install-status-no-privileges Suite:operator Tags:common}
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-install-source] Recording result "PASSED", claimID: {Id:operator-install-source Suite:operator Tags:common}
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-semantic-versioning] Recording result "PASSED", claimID: {Id:operator-semantic-versioning Suite:operator Tags:common}
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-crd-versioning] Recording result "PASSED", claimID: {Id:operator-crd-versioning Suite:operator Tags:common}
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-crd-openapi-schema] Recording result "PASSED", claimID: {Id:operator-crd-openapi-schema Suite:operator Tags:common}
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-single-crd-owner] Recording result "PASSED", claimID: {Id:operator-single-crd-owner Suite:operator Tags:common}
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-pods-no-hugepages] Recording result "PASSED", claimID: {Id:operator-pods-no-hugepages Suite:operator Tags:common}
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-olm-skip-range] Recording result "PASSED", claimID: {Id:operator-olm-skip-range Suite:operator Tags:common}
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-multiple-same-operators] Recording result "PASSED", claimID: {Id:operator-multiple-same-operators Suite:operator Tags:common}
[INFO] [Nov  7 09:59:55.593] [checksdb.go: 115] [operator-operator-bundle-count] Recording result "SKIPPED", claimID: {Id:operator-operator-bundle-count Suite:operator Tags:common}

In our case, we create a CatalogSource called nfv-example-cnf-catalog in the default openshift-marketplace namespace. Is it the reason why it's not autodiscovered for this test (not using the workload namespace)?

@sebrandon1
Copy link
Member Author

At the moment, the requirement is to only test catalogSources that come from a namespace-under-test. Users don't have to label their catalog sources. Let me bring that up with the rest of the team to see if that would make sense to change it.

@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch 2 times, most recently from 58619de to ee78a85 Compare November 7, 2024 17:22
@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch from ee78a85 to cad28de Compare November 7, 2024 17:32
@dcibot
Copy link
Collaborator

dcibot commented Nov 7, 2024

@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch from cad28de to 2bda85b Compare November 7, 2024 21:04
@dcibot
Copy link
Collaborator

dcibot commented Nov 7, 2024

@sebrandon1
Copy link
Member Author

redhat-best-practices-for-k8s/certsuite-sample-workload#502

I added a sample catalogsource in the sample-workload repo that gets deployed in the CI so we can mark it as an expected passing test. I will also add a positive and negative test in QE.

@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch 3 times, most recently from 85a95fc to ba205ea Compare November 7, 2024 22:14
@dcibot
Copy link
Collaborator

dcibot commented Nov 7, 2024

@dcibot
Copy link
Collaborator

dcibot commented Nov 8, 2024

@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch from a35e0a4 to e321320 Compare November 8, 2024 00:55
@dcibot
Copy link
Collaborator

dcibot commented Nov 8, 2024

@dcibot
Copy link
Collaborator

dcibot commented Nov 8, 2024

@ramperher
Copy link
Collaborator

from change #2549:

@sebrandon1, the operator-bundle-count test is still skipped. Please tell me if you need some info to troubleshoot, but in the DCI job, in Files section, you can take a look at the claim.json file, certsuite.log (however, no logs are provided to this test, it directly says that no CatalogSource was found) and so on.

@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch from e321320 to 7e57fde Compare November 11, 2024 14:59
@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch 2 times, most recently from 3f9b195 to aa6e294 Compare December 2, 2024 22:10
@dcibot
Copy link
Collaborator

dcibot commented Dec 2, 2024

tests/operator/suite.go Outdated Show resolved Hide resolved
@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch from aa6e294 to d87d5ef Compare December 3, 2024 14:35
@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch from d87d5ef to 3175a0f Compare December 3, 2024 14:46
@dcibot
Copy link
Collaborator

dcibot commented Dec 3, 2024

@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch from d3df56b to 837bc3c Compare December 3, 2024 21:05
@sebrandon1
Copy link
Member Author

Okay I was able to verify that the logic I added for performing the grpcurl on clusters <= 4.12 works on my QE branch. @ramperher can you verify my latest commit works on your 4.12 setup?

@dcibot
Copy link
Collaborator

dcibot commented Dec 3, 2024

@ramperher
Copy link
Collaborator

Okay I was able to verify that the logic I added for performing the grpcurl on clusters <= 4.12 works on my QE branch. @ramperher can you verify my latest commit works on your 4.12 setup?

I will schedule it when it's available, it will take some time but I'll tell you when it's ready

@dcibot
Copy link
Collaborator

dcibot commented Dec 4, 2024

@ramperher
Copy link
Collaborator

ramperher commented Dec 4, 2024

from change #2549:

Tested with 4.12, and the test is skipped in this case, it's returning 0 to all executions. This needs to be reviewed.
I remember that, when testing grpcurl in the past, I needed to have it bavailable in the debug daemonset. @edcdavid created an image for that: #2549 (comment). My impression is that we need this available in the debug daemonset to make it work.

@sebrandon1
Copy link
Member Author

sebrandon1 commented Dec 4, 2024

@ramperher Yup it is installed an available in v0.0.11 of the probe image. We are issuing the grpcurl command from the probe pod to the catalogsource service. I'll take a look at the execution logs.

EDIT: I see what's wrong with it. The SkipPMBasedOnChannel is skipping PM's based on channel.entries (something that doesn't exist in 4.12). So everything is just skipped even before it gets to the bundle count lookup. Let me think about how to get around that.....

Look through CSVs and PackageManifests

Remove curl lookup; use relatedImages

Add filter for already reported catalogsources

additional cleanup; catalogsource pkg and tests

total up channel entries for bundle count

cleanup and rebuild catalog
@sebrandon1 sebrandon1 force-pushed the bundle_less_than_1000 branch from 52cd072 to d8b0307 Compare December 5, 2024 14:30
@dcibot
Copy link
Collaborator

dcibot commented Dec 5, 2024

@dcibot
Copy link
Collaborator

dcibot commented Dec 5, 2024

@ramperher
Copy link
Collaborator

from change #2549:

Now it's passing in OCP 4.12, so LGTM

Copy link
Collaborator

@ramperher ramperher left a comment

Choose a reason for hiding this comment

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

LGTM

@sebrandon1 sebrandon1 merged commit c90ecc2 into redhat-best-practices-for-k8s:main Dec 5, 2024
34 checks passed
@sebrandon1 sebrandon1 deleted the bundle_less_than_1000 branch December 5, 2024 16:48
@dcibot
Copy link
Collaborator

dcibot commented Dec 5, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants