-
Notifications
You must be signed in to change notification settings - Fork 47
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 TestClusterExtensionInstallReResolvesWhenNewCataloge2e test #1008
Open
yashoza19
wants to merge
1
commit into
operator-framework:main
Choose a base branch
from
yashoza19:issue945
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
testdata/catalogs/test-catalog.Dockerfile → testdata/catalogs/test-catalog-v1.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM scratch | ||
ADD test-catalog-v2 /configs | ||
|
||
# Set DC-specific label for the location of the DC root directory | ||
# in the image | ||
LABEL operators.operatorframework.io.index.configs.v1=/configs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/expected_all.json | ||
..* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
schema: olm.package | ||
name: prometheus | ||
defaultChannel: beta | ||
--- | ||
schema: olm.channel | ||
name: beta | ||
package: prometheus | ||
entries: | ||
- name: prometheus-operator.2.0.0 | ||
replaces: prometheus-operator.1.2.0 | ||
--- | ||
schema: olm.bundle | ||
name: prometheus-operator.1.2.0 | ||
package: prometheus | ||
image: docker-registry.operator-controller-e2e.svc.cluster.local:5000/bundles/registry-v1/prometheus-operator:v1.2.0 | ||
properties: | ||
- type: olm.package | ||
value: | ||
packageName: prometheus | ||
version: 1.2.0 | ||
--- | ||
schema: olm.bundle | ||
name: prometheus-operator.2.0.0 | ||
package: prometheus | ||
image: docker-registry.operator-controller-e2e.svc.cluster.local:5000/bundles/registry-v1/prometheus-operator:v2.0.0 | ||
properties: | ||
- type: olm.package | ||
value: | ||
packageName: prometheus | ||
version: 2.0.0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a valid test case (where we patch the spec of a ClusterCatalog), but it does not cover the case I had in mind (and a case I think we need to cover).
What I have in mind here specifically is that we need to prove that the polling behavior alone is enough to trigger an upgrade of a ClusterExtension. Forcing a change by changing the image in the ClusterCatalog spec is a side-effect foils the true intention of the test.
This "polling triggers an upgrade" test is one of the most important features of OLM, so we unfortunately can't "fake" it by touching the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my first approach as well. Unfortunately, I can't find a way to change the
latest
image tag on a local registry.crane
does not allow to change tags on local registries, hence I took this approach. Let me know if you you think this is still a valid test or we can approach this issue with a different solution. @joelanfordThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this accomplished in the current version of OLM? The use of make/sh/kinako(spelling), to get things into the cluster, the go to
run tests
, IMO blurs what is/isn't being tested, there aren't clear separation of duties in this model.Correct me if I'm wrong, but I think you want an image loaded into the running cluster after the test has executed? Is that correct? Or do you just want this test to run longer to see if the
polling
picks up the the image already in the registry?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure
I agree that the number of moving parts is a problem. I'm fairly confident that if we wanted something a bit leaner, we could build all of this in Go.
kubectl port-forward
to give the e2e test a way to communicate with the registry.No, I don't think that is sufficient because the polling behavior of catalogd queries a remote registry.
kind load
would not make it visible to the polling process. What I'm after is $something that causes the digest of a tag to change mid way through the test. That could be one of:repo:tag
as part of the setup, and then pushing the second image at that samerepo:tag
during the test.