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 1796078: Filter OLM operators by architecture #3887
Bug 1796078: Filter OLM operators by architecture #3887
Conversation
6188e2c
to
bcc84f6
Compare
850ac94
to
eff3eee
Compare
frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx
Outdated
Show resolved
Hide resolved
1caf3f3
to
af9940e
Compare
@spadgett @TheRealJon updated per feedback. |
/cherry-pick release-4.3 |
@benjaminapetersen: once the present PR merges, I will cherry-pick it on top of release-4.3 in a new PR and assign it to you. 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. |
frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx
Outdated
Show resolved
Hide resolved
@benjaminapetersen ping, do you mind rebasing? |
/bugzilla refresh |
@spadgett: This pull request references Bugzilla bug 1796078, 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. |
/cherry-pick release-4.4 |
@spadgett: once the present PR merges, I will cherry-pick it on top of release-4.4 in a new PR and assign it to you. 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. |
- Server side passing of GOOS and GOARCH via SERVER_FLAGS - Defaulting of Operators to: - operatorframework.io/arch.amd64 - operatorframework.io/os.linux - No filtering for off-cluster/dev mode
6bb1a88
to
e9adf08
Compare
/retest
no change to vendor bundle. |
/retest
|
/retest
|
@@ -332,10 +388,28 @@ export const OperatorHubTileView: React.FC<OperatorHubTileViewProps> = (props) = | |||
detailsItem && | |||
`/k8s/ns/${detailsItem.subscription.metadata.namespace}/${SubscriptionModel.plural}/${detailsItem.subscription.metadata.name}?showDelete=true`; | |||
|
|||
if (_.isEmpty(filteredItems)) { | |||
return ( | |||
<> |
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.
Don't need fragment here since you're returning a single top level component.
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.
Also good, will make a note for a follow.
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.
@benjaminapetersen small nit on EmptyState return. lgtm otherwise.
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.
/lgtm
Just one minor performance nit.
@@ -233,12 +287,14 @@ export const OperatorHubTileView: React.FC<OperatorHubTileViewProps> = (props) = | |||
const [detailsItem, setDetailsItem] = React.useState(null); | |||
const [showDetails, setShowDetails] = React.useState(false); | |||
|
|||
const filteredItems = filterByArchAndOS(props.items); |
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: this should probably be memoized so that it doesn't get recalculated on every render.
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.
Nice, that would be a good optimization. I'll make a note for a follow.
/lgtm |
+1 thx for the review! Would be good to get for 4.4. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benjaminapetersen, jcaianirh, TheRealJon 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 |
@benjaminapetersen: All pull requests linked via external trackers have merged. Bugzilla bug 1796078 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. |
@benjaminapetersen: #3887 failed to apply on top of branch "release-4.3":
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. |
@spadgett: new pull request created: #4630 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. |
4.4 bug https://bugzilla.redhat.com/show_bug.cgi?id=1796078
4.3 clone https://bugzilla.redhat.com/show_bug.cgi?id=1796079
4.2 clone https://bugzilla.redhat.com/show_bug.cgi?id=1796080
https://issues.redhat.com/browse/CONSOLE-2004
Based on the following proposal: operator-framework/olm-book#29
OLM implementation coming here: operator-framework/operator-lifecycle-manager#1220
window.SERVER_FLAGS.clusterArchitecture
The filtering portion of this may come as a separate PR, depending on complexity. We will need 4.3 & (likely) 4.2 backports.
Labels will look like the following:
specifically:
Furthermore, rules are as follows:
Simple Empty State if there are no operators that pass the filter:
/assign @spadgett @TheRealJon