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

fix(olm): remove dependency on marketplace-provided content #26993

Closed
wants to merge 1 commit into from

Conversation

njhale
Copy link
Contributor

@njhale njhale commented Apr 7, 2022

Remove a test dependency on the marketplace-provided redhat-operators
catalog by introducing a new catalog test fixture, pinning to content released
during 4.10. This makes less assumptions about future content allowing for a
more stable test. This also allows us to run the test when when the marketplace
capability is disabled.

Signed-off-by: Nick Hale njohnhale@gmail.com

See https://issues.redhat.com/browse/OLM-2542 for more details.

o.Expect(err).NotTo(o.HaveOccurred())
if !ok {
g.Skip("redhat-operators source not found in enabled sources")
Copy link
Contributor

Choose a reason for hiding this comment

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

should we be concerned that this check was not working? Does that mean we're not actually disabling some aspect of the redhat-operators source when marketplace is not enabled?

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 was testing the OperatorHub API, which still exists as part of a separate problem that I'm currently tracking -- I'll post a PR here when there are more updates.

// configure OperatorGroup before tests
configFile, err := oc.AsAdmin().Run("process").Args("--ignore-unknown-parameters=true", "-f", operatorGroup, "-p", "NAME=test-operator", fmt.Sprintf("NAMESPACE=%s", oc.Namespace())).OutputToFile("config.json")
// Configure CatalogSource before tests
const image = "registry.redhat.io/redhat/redhat-operator-index:v4.10"
Copy link
Contributor

Choose a reason for hiding this comment

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

this is going to be a source of bit-rot someday.

can we identify the clusterversion and pick the version tag based on that, dynamically?

Copy link
Contributor

Choose a reason for hiding this comment

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

or pull the value in from elsewhere? (i know we also have the challenge that the day we start v4.12, there may not be a v4.12 catalog published, so that could be a problem too... maybe n-1 is the tag to use)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've asked the same questions before and I think the long-term solution is for the catalog fixture to be built as a part of the test setup.

or pull the value in from elsewhere? (i know we also have the challenge that the day we start v4.12, there may not be a v4.12 catalog published, so that could be a problem too... maybe n-1 is the tag to use)

I like this, but it seems like we'd just be shifting the problem over one release; i.e. when we're testing 4.12, if we grabbed the n-1 tag, we'd be assuming the same image name and convention were carried over from 4.10 to 4.11 (since the test in 4.11 points at the image in 4.10) -- moreover, we'd still inherit the primary issue of today's tests: there's no guarantee that the content we're using as a fixture hasn't changed.

Copy link
Contributor

@bparees bparees Apr 11, 2022

Choose a reason for hiding this comment

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

yeah i guess maybe pinning to 4.10 and if someday that breaks on a v4.16 cluster, we can bump it at that point, is the most straightforward answer for now. not ideal, but not worth holding this up over.

@njhale njhale force-pushed the fix/olm-test branch 2 times, most recently from 3358ac1 to 69821cf Compare April 11, 2022 19:16
@bparees
Copy link
Contributor

bparees commented Apr 11, 2022

/hold

this change is fine, but we need to sort out why the operatorhub api is getting installed when it should not be, and right now the existing state of this test(failing) is a handy way to sort that out.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 11, 2022
@timflannagan
Copy link
Contributor

/uncc

@openshift-ci openshift-ci bot removed the request for review from timflannagan April 12, 2022 17:06
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 17, 2022
@wking
Copy link
Member

wking commented May 12, 2022

this change is fine, but we need to sort out why the operatorhub api is getting installed when it should not be...

openshift/cluster-config-operator#245 just landed, which should be the last step in dancing the CRD over into the marketplace operator's repo.

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 12, 2022
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 1, 2022
@njhale
Copy link
Contributor Author

njhale commented Jun 1, 2022

/retest

@bparees
Copy link
Contributor

bparees commented Jun 8, 2022

/approve
/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 8, 2022
Remove a test dependency on the marketplace-provided redhat-operators
catalog by introducing a new catalog test fixture, pinning to content released
during 4.10. This makes less assumptions about future content allowing for a
more stable test. This also allows us to run the test when when the marketplace
capability is disabled.

Signed-off-by: Nick Hale <njohnhale@gmail.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2022
@bparees
Copy link
Contributor

bparees commented Jun 21, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 21, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bparees, njhale

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-robot
Copy link

/retest-required

Remaining retests: 2 against base HEAD a946e2b and 8 for PR HEAD bb07462 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 1 against base HEAD a946e2b and 7 for PR HEAD bb07462 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD a946e2b and 6 for PR HEAD bb07462 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 2 against base HEAD 8acbe70 and 5 for PR HEAD bb07462 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 2 against base HEAD 456a782 and 4 for PR HEAD bb07462 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 1 against base HEAD 456a782 and 3 for PR HEAD bb07462 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 2 against base HEAD 9106ea0 and 2 for PR HEAD bb07462 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 1 against base HEAD 9106ea0 and 1 for PR HEAD bb07462 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 2 against base HEAD 4510898 and 0 for PR HEAD bb07462 in total

@openshift-ci-robot
Copy link

/hold

Revision bb07462 was retested 9 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 2, 2022
@anik120
Copy link
Contributor

anik120 commented Jul 12, 2022

/test e2e-aws-single-node

@anik120
Copy link
Contributor

anik120 commented Jul 12, 2022

/test e2e-aws-single-node-upgrade

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 12, 2022

@njhale: 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-gcp bb07462 link true /test e2e-gcp
ci/prow/e2e-aws-fips bb07462 link true /test e2e-aws-fips
ci/prow/e2e-aws-single-node-upgrade bb07462 link false /test e2e-aws-single-node-upgrade
ci/prow/e2e-aws-single-node bb07462 link false /test e2e-aws-single-node

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/test-infra repository. I understand the commands that are listed here.

@anik120
Copy link
Contributor

anik120 commented Jul 13, 2022

closing in favor of #27302

/close

@openshift-ci openshift-ci bot closed this Jul 13, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 13, 2022

@anik120: Closed this PR.

In response to this:

closing in favor of #27302

/close

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/test-infra 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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants