Skip to content

Bug 1830031: Update OLM to use UID for OG Labels #1496

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

Merged

Conversation

awgreene
Copy link
Member

@awgreene awgreene commented May 1, 2020

Problem:
OLM is using an older version of the operator-framework/api repository
with which OLM applies a label with a blank value whose key is equal to
"olm.operatorgroup/.".
Kubernetes limits the lengths of label values and keys to 63 characters.
This limit can easily be overcome when the OperatorGroup has a long name
or when it is deployed in a namespace with a long name.

Solution:
Update OLM to use import the latest version of the operator-framework/api
repository that uses "olm.operatorgroup.uid/" as the key
for OperatorGroup labels. The length of this label will always be 58
characters as UIDs are 36 characters long.

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels May 1, 2020
@openshift-ci-robot
Copy link
Collaborator

@awgreene: This pull request references Bugzilla bug 1830031, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1830031: Update OLM to use UID for OG Labels

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.

@benluddy
Copy link
Contributor

benluddy commented May 1, 2020

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 1, 2020
@benluddy
Copy link
Contributor

benluddy commented May 1, 2020

It looks like a libcontainer package using CGO is being transitively pulled in via the latest operator-registry: https://github.com/operator-framework/operator-lifecycle-manager/pull/1496/checks?check_run_id=637003810, which breaks the upstream image build. It has +nocgo implementations, though.

@benluddy
Copy link
Contributor

benluddy commented May 4, 2020

Looks like there's a legitimate E2E failure -- OpenShift Prow was broken over most of the weekend and incorrectly marking failing checks green.

/test e2e-aws-olm

@benluddy
Copy link
Contributor

benluddy commented May 4, 2020

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 4, 2020
@benluddy
Copy link
Contributor

benluddy commented May 4, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 4, 2020
@dinhxuanvu
Copy link
Member

/retest

@kevinrizza
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 4, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@awgreene
Copy link
Member Author

awgreene commented May 4, 2020

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 4, 2020
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label May 6, 2020
@awgreene
Copy link
Member Author

awgreene commented May 6, 2020

/unhold

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 6, 2020
@awgreene
Copy link
Member Author

awgreene commented May 6, 2020

/test unit

@awgreene
Copy link
Member Author

awgreene commented May 6, 2020

/retest

Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

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

Looks great! One last question on CGO usage.

@@ -2096,7 +2096,7 @@ var _ = Describe("Operator Group", func() {
}()

// Create the OperatorGroup Label
ogLabel := fmt.Sprintf("olm.operatorgroup/%s.%s", testNamespaceA, operatorGroup.GetName())
Copy link
Member

Choose a reason for hiding this comment

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

Note: can we make this a method of *OperatorGroup or a wrapper?

@awgreene
Copy link
Member Author

awgreene commented May 6, 2020

/retest

awgreene added 2 commits May 6, 2020 13:45
Problem:
OLM is using an older version of the operator-framework/api repository
with which OLM applies a label with a blank value whose key is equal to
"olm.operatorgroup/.".
Kubernetes limits the lengths of label values and keys to 63 characters.
This limit can easily be overcome when the OperatorGroup has a long name
or when it is deployed in a namespace with a long name.

Solution:
Update OLM to use import the latest version of the operator-framework/api
repository that uses "olm.operatorgroup.uid/" as the key
for OperatorGroup labels. The length of this label will always be 58
characters as UIDs are 36 characters long.
@benluddy
Copy link
Contributor

benluddy commented May 6, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 6, 2020
@njhale
Copy link
Member

njhale commented May 6, 2020

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awgreene, benluddy, 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-merge-robot openshift-merge-robot merged commit a947685 into operator-framework:master May 6, 2020
@openshift-ci-robot
Copy link
Collaborator

@awgreene: All pull requests linked via external trackers have merged: operator-framework/api#31, operator-framework/operator-lifecycle-manager#1496. Bugzilla bug 1830031 has been moved to the MODIFIED state.

In response to this:

Bug 1830031: Update OLM to use UID for OG Labels

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.

@awgreene
Copy link
Member Author

awgreene commented May 7, 2020

/cherry-pick release-4.4

@openshift-cherrypick-robot

@awgreene: #1496 failed to apply on top of branch "release-4.4":

Using index info to reconstruct a base tree...
M	go.mod
M	go.sum
A	pkg/controller/install/webhook.go
M	pkg/controller/operators/olm/operator.go
M	test/e2e/csv_e2e_test.go
M	test/e2e/operator_groups_e2e_test.go
A	vendor/github.com/operator-framework/api/crds/defs.go
A	vendor/github.com/operator-framework/api/crds/operators.coreos.com_catalogsources.yaml
A	vendor/github.com/operator-framework/api/crds/operators.coreos.com_clusterserviceversions.yaml
A	vendor/github.com/operator-framework/api/crds/operators.coreos.com_installplans.yaml
A	vendor/github.com/operator-framework/api/crds/operators.coreos.com_operatorgroups.yaml
A	vendor/github.com/operator-framework/api/crds/operators.coreos.com_operators.yaml
A	vendor/github.com/operator-framework/api/crds/operators.coreos.com_subscriptions.yaml
A	vendor/github.com/operator-framework/api/crds/zz_defs.go
A	vendor/github.com/operator-framework/api/pkg/operators/v1/operatorgroup_types.go
M	vendor/github.com/operator-framework/operator-registry/pkg/containertools/dockerfilegenerator.go.git/rebase-apply/patch:12273: new blank line at EOF.
+
.git/rebase-apply/patch:30742: new blank line at EOF.
+
warning: 2 lines add whitespace errors.

A	vendor/github.com/operator-framework/operator-registry/pkg/image/registry.go
M	vendor/github.com/operator-framework/operator-registry/pkg/lib/bundle/exporter.go
M	vendor/github.com/operator-framework/operator-registry/pkg/lib/bundle/generate.go
M	vendor/github.com/operator-framework/operator-registry/pkg/lib/bundle/validate.go
A	vendor/github.com/operator-framework/operator-registry/pkg/registry/graph.go
A	vendor/github.com/operator-framework/operator-registry/pkg/registry/populator.go
M	vendor/github.com/operator-framework/operator-registry/pkg/registry/types.go
M	vendor/k8s.io/apimachinery/pkg/util/net/http.go
M	vendor/k8s.io/client-go/plugin/pkg/client/auth/azure/azure.go
M	vendor/k8s.io/client-go/rest/request.go
M	vendor/k8s.io/client-go/tools/cache/reflector.go
M	vendor/modules.txt
M	vendor/sigs.k8s.io/controller-tools/pkg/rbac/zz_generated.markerhelp.go
M	vendor/sigs.k8s.io/controller-tools/pkg/webhook/parser.go
M	vendor/sigs.k8s.io/controller-tools/pkg/webhook/zz_generated.markerhelp.go
Falling back to patching base and 3-way merge...
Auto-merging vendor/sigs.k8s.io/controller-tools/pkg/webhook/zz_generated.markerhelp.go
CONFLICT (content): Merge conflict in vendor/sigs.k8s.io/controller-tools/pkg/webhook/zz_generated.markerhelp.go
Auto-merging vendor/sigs.k8s.io/controller-tools/pkg/webhook/parser.go
CONFLICT (content): Merge conflict in vendor/sigs.k8s.io/controller-tools/pkg/webhook/parser.go
Auto-merging vendor/sigs.k8s.io/controller-tools/pkg/rbac/zz_generated.markerhelp.go
CONFLICT (content): Merge conflict in vendor/sigs.k8s.io/controller-tools/pkg/rbac/zz_generated.markerhelp.go
Auto-merging vendor/modules.txt
CONFLICT (content): Merge conflict in vendor/modules.txt
Auto-merging vendor/k8s.io/client-go/tools/cache/reflector.go
Auto-merging vendor/k8s.io/client-go/rest/request.go
Auto-merging vendor/k8s.io/client-go/plugin/pkg/client/auth/azure/azure.go
CONFLICT (content): Merge conflict in vendor/k8s.io/client-go/plugin/pkg/client/auth/azure/azure.go
Auto-merging vendor/k8s.io/apimachinery/pkg/util/net/http.go
Auto-merging vendor/github.com/operator-framework/operator-registry/pkg/registry/types.go
CONFLICT (content): Merge conflict in vendor/github.com/operator-framework/operator-registry/pkg/registry/types.go
CONFLICT (modify/delete): vendor/github.com/operator-framework/operator-registry/pkg/registry/populator.go deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/operator-registry/pkg/registry/populator.go left in tree.
CONFLICT (modify/delete): vendor/github.com/operator-framework/operator-registry/pkg/registry/graph.go deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/operator-registry/pkg/registry/graph.go left in tree.
Auto-merging vendor/github.com/operator-framework/operator-registry/pkg/lib/bundle/validate.go
Auto-merging vendor/github.com/operator-framework/operator-registry/pkg/lib/bundle/generate.go
CONFLICT (content): Merge conflict in vendor/github.com/operator-framework/operator-registry/pkg/lib/bundle/generate.go
Auto-merging vendor/github.com/operator-framework/operator-registry/pkg/lib/bundle/exporter.go
CONFLICT (modify/delete): vendor/github.com/operator-framework/operator-registry/pkg/image/registry.go deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/operator-registry/pkg/image/registry.go left in tree.
Auto-merging vendor/github.com/operator-framework/operator-registry/pkg/containertools/dockerfilegenerator.go
CONFLICT (content): Merge conflict in vendor/github.com/operator-framework/operator-registry/pkg/containertools/dockerfilegenerator.go
CONFLICT (modify/delete): vendor/github.com/operator-framework/api/crds/zz_defs.go deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/api/crds/zz_defs.go left in tree.
CONFLICT (modify/delete): vendor/github.com/operator-framework/api/crds/operators.coreos.com_subscriptions.yaml deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/api/crds/operators.coreos.com_subscriptions.yaml left in tree.
CONFLICT (modify/delete): vendor/github.com/operator-framework/api/crds/operators.coreos.com_operators.yaml deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/api/crds/operators.coreos.com_operators.yaml left in tree.
CONFLICT (modify/delete): vendor/github.com/operator-framework/api/crds/operators.coreos.com_operatorgroups.yaml deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/api/crds/operators.coreos.com_operatorgroups.yaml left in tree.
CONFLICT (modify/delete): vendor/github.com/operator-framework/api/crds/operators.coreos.com_installplans.yaml deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/api/crds/operators.coreos.com_installplans.yaml left in tree.
CONFLICT (modify/delete): vendor/github.com/operator-framework/api/crds/operators.coreos.com_clusterserviceversions.yaml deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/api/crds/operators.coreos.com_clusterserviceversions.yaml left in tree.
CONFLICT (modify/delete): vendor/github.com/operator-framework/api/crds/operators.coreos.com_catalogsources.yaml deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/api/crds/operators.coreos.com_catalogsources.yaml left in tree.
CONFLICT (modify/delete): vendor/github.com/operator-framework/api/crds/defs.go deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of vendor/github.com/operator-framework/api/crds/defs.go left in tree.
Auto-merging test/e2e/operator_groups_e2e_test.go
CONFLICT (content): Merge conflict in test/e2e/operator_groups_e2e_test.go
Auto-merging test/e2e/csv_e2e_test.go
CONFLICT (content): Merge conflict in test/e2e/csv_e2e_test.go
Auto-merging pkg/controller/operators/olm/operator.go
CONFLICT (content): Merge conflict in pkg/controller/operators/olm/operator.go
CONFLICT (modify/delete): pkg/controller/install/webhook.go deleted in HEAD and modified in Update OLM to use UID for OG Labels. Version Update OLM to use UID for OG Labels of pkg/controller/install/webhook.go left in tree.
Auto-merging pkg/api/apis/operators/v1/operatorgroup_types.go
CONFLICT (content): Merge conflict in pkg/api/apis/operators/v1/operatorgroup_types.go
Auto-merging go.sum
CONFLICT (content): Merge conflict in go.sum
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
error: Failed to merge in the changes.
Patch failed at 0001 Update OLM to use UID for OG Labels

In response to this:

/cherry-pick release-4.4

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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants