-
Notifications
You must be signed in to change notification settings - Fork 544
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
Bug 1779313: Enable multiple namespaces sync if catsrc is updated in global ns #1125
Bug 1779313: Enable multiple namespaces sync if catsrc is updated in global ns #1125
Conversation
/retest |
@dinhxuanvu |
4e9df29
to
6f17273
Compare
/retest |
@dinhxuanvu could you open a BZ for this? |
@njhale This PR is to address the issue on the existing bug that we were talking about during standup early on this week. I haven't tagged the bug on the title yet. |
/retest |
6f17273
to
cfd087c
Compare
@dinhxuanvu: This pull request references Bugzilla bug 1749031, which is valid. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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. |
cfd087c
to
1502b75
Compare
/retest |
9dd29fc
to
693a312
Compare
@dinhxuanvu: This pull request references Bugzilla bug 1775323, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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. |
/bugzilla refresh |
@njhale: This pull request references Bugzilla bug 1775323, which is valid. In response to this:
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. |
9d95057
to
b42f7d7
Compare
/retest |
1 similar comment
/retest |
/retest |
9d9901c
to
5bb767a
Compare
5bb767a
to
9be6708
Compare
Signed-off-by: Vu Dinh <vdinh@redhat.com>
9be6708
to
45f0689
Compare
/retest |
/hold |
/retest |
@dinhxuanvu: This pull request references Bugzilla bug 1779313, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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. |
/hold cancel |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dinhxuanvu, jpeeler 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 |
@dinhxuanvu: All pull requests linked via external trackers have merged. Bugzilla bug 1779313 has been moved to the MODIFIED state. In response to this:
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. |
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.
Looks like @jpeeler beat me to the punch!
I mostly had nits. I'm leaving them here in case you're interested @dinhxuanvu.
@@ -0,0 +1,53 @@ | |||
package indexer |
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.
nit: although there are some exceptions, this probably shouldn't be in the lib
folder since it contains OLM specific logic.
} | ||
|
||
if sub.Spec.CatalogSource != "" && sub.Spec.CatalogSourceNamespace != "" { | ||
return []string{sub.Spec.CatalogSource + "/" + sub.Spec.CatalogSourceNamespace}, nil |
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.
nit: the common convention is namespace/name
.
|
||
// CatalogSubscriberNamespaces returns the list of namespace (as a map with namespace as key) | ||
// which has Suscriptions(s) that subscribe(s) to a given CatalogSource (name/namespace) | ||
func CatalogSubscriberNamespaces(indexers map[string]cache.Indexer, name, namespace string) (map[string]struct{}, error) { |
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.
nit: the result map isn't being used as a map outside of this function -- seems kinda leaky
// Locally it is `olm` | ||
namespaces, _ := c.KubernetesInterface().CoreV1().Namespaces().List(metav1.ListOptions{}) | ||
for _, ns := range namespaces.Items { | ||
if ns.GetName() == "openshift-marketplace" { |
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.
nit: it would be nice to take this as a test argument so we can avoid making configuration assumptions in our test logic.
CatalogSourceNamespace: globalNS, | ||
Package: mainPackageName, | ||
Channel: stableChannel, | ||
StartingCSV: mainCSV.GetName(), |
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.
nit: no need to specify a StartingCSV
or a manual approval strategy
installPlanName := subscription.Status.Install.Name | ||
requiresApprovalChecker := buildInstallPlanPhaseCheckFunc(v1alpha1.InstallPlanPhaseRequiresApproval) | ||
fetchedInstallPlan, err := fetchInstallPlan(t, crc, installPlanName, requiresApprovalChecker) | ||
require.NoError(t, err) | ||
|
||
fetchedInstallPlan.Spec.Approved = true | ||
_, err = crc.OperatorsV1alpha1().InstallPlans(testNamespace).Update(fetchedInstallPlan) | ||
require.NoError(t, err) |
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.
Since you only put the manifests for the first CSV into the catalog, there's no need to step through updates using a manual approval strategy.
/cherry-pick release-4.3 |
@dinhxuanvu: new pull request created: #1166 In response to this:
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. |
/cherry-pick release-4.2 |
@dinhxuanvu: failed to push cherry-picked changes in GitHub: pushing failed, output: "remote: Not Found\nfatal: repository 'https://openshift-cherrypick-robot:CENSORED@github.com/openshift-cherrypick-robot/operator-framework/operator-lifecycle-manager/' not found\n", error: exit status 128 In response to this:
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. |
Currently, if CatalogSource is updated and connection is Ready,
only the namespace where CatalogSource resides gets resynced. Now, a list
of namespaces that contain Subscriptions that use updated CatalogSource
will get resynced instead.
Signed-off-by: Vu Dinh vdinh@redhat.com
Description of the change:
Motivation for the change:
Reviewer Checklist
/docs