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

ci: Add support for configuring the global catalog namespace #2825

Conversation

timflannagan
Copy link
Member

Signed-off-by: timflannagan [email protected]

Description of the change:
Add support for configuring the global catalog namespace in the e2e testing suite. Introduces a CLI flag for configuring the global catalog namespace for OLM. This kind of configuration is already present in the catalog-operator's CLI flags, so this is essentially a no-op for upstream OLM given we deploy the OLM stack and the catalog sources in the same namespace. These changes should make it easier for different distributions of OLM, e.g. openshift, that deploy any default catalog source resources in a dedicated namespace.

Motivation for the change:
Accommodate different distributions of OLM that have dedicated catalog namespaces. Reduce any testing flakes for OLM.

Architectural changes:
N/A.

Testing remarks:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Bug fixes are accompanied by regression test(s)
  • e2e tests and flake fixes are accompanied evidence of flake testing, e.g. executing the test 100(0) times
  • tech debt/todo is accompanied by issue link(s) in comments in the surrounding code
  • Tests are comprehensible, e.g. Ginkgo DSL is being used appropriately
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive
  • Tests marked as [FLAKE] are truly flaky and have an issue
  • Code is properly formatted

@openshift-ci openshift-ci bot requested review from akihikokuroda and awgreene July 29, 2022 13:28
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 29, 2022
@timflannagan timflannagan force-pushed the ci/configure-global-catalog-namespace branch from 37042cc to 8566c55 Compare July 29, 2022 13:29
@@ -134,10 +134,11 @@ TEST := $(shell go run ./test/e2e/split/... -chunks $(E2E_TEST_NUM_CHUNKS) -prin
endif
E2E_OPTS ?= $(if $(E2E_SEED),-seed '$(E2E_SEED)') $(if $(SKIP), -skip '$(SKIP)') $(if $(TEST),-focus '$(TEST)') $(if $(ARTIFACT_DIR), -output-dir $(ARTIFACT_DIR) -junit-report junit_e2e.xml) -flake-attempts $(E2E_FLAKE_ATTEMPTS) -nodes $(E2E_NODES) -timeout $(E2E_TIMEOUT) -v -randomize-suites -race -trace -progress
E2E_INSTALL_NS ?= operator-lifecycle-manager
E2E_CATALOG_NS ?= $(E2E_INSTALL_NS)
Copy link
Member Author

Choose a reason for hiding this comment

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

Setting this to the same value as the OLM installation namespace is intention. This seemed like the best approach to reduce the amount of variables that needed to be overridden between the e2e and e2e-local targets. For upstream environments, you may only need to run make e2e E2E_CATALOG_NS=olm for clusters that were already created, and for the e2e-local target, it should be a no-op but there's no integration tests that can easily test all these configuration permutations.

@timflannagan
Copy link
Member Author

Note: this should fix a permafailing downstream OLM testing flake. See openshift/operator-framework-olm#345 which was a sanity check before opening these changes.

When running the OLM testing suite on an OCP (or crc) cluster, you could run the following: make e2e E2E_CATALOG_NS=openshift-marketplace E2E_INSTALL_NS=openshift-operator-lifecycle-manager E2E_TEST_NS=openshift-operators now.

Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci
Copy link

openshift-ci bot commented Jul 29, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinhxuanvu, timflannagan

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:
  • OWNERS [dinhxuanvu,timflannagan]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@grokspawn
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 29, 2022
@openshift-merge-robot openshift-merge-robot merged commit c652154 into operator-framework:master Jul 29, 2022
@timflannagan timflannagan deleted the ci/configure-global-catalog-namespace branch July 29, 2022 14:07
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants