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

Bug 1793893: Make clear what uninstalling an operator that works for all namespaces does #4137

Merged
merged 1 commit into from Feb 4, 2020

Conversation

jhadvig
Copy link
Member

@jhadvig jhadvig commented Jan 31, 2020

When a operator with and AllNamespaces install mode, which is installed into openshift-operators is uninstalled from any of the installed namespaces, we should inform about the fact that it will be uninstalled from all the namespaces, not just that one particular:

Screenshot 2020-01-31 at 12 42 04

In case the operator is installed just to a single namespace we will show the original message:

Screenshot 2020-01-31 at 12 42 19

/assign @spadgett

@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Bugzilla bug 1793893, 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:

Bug 1793893: Make clear what uninstalling an operator that works for all namespaces does

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. component/olm Related to OLM labels Jan 31, 2020
Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

This might be good enough since it will work for OpenShift clusters, but isn't strictly correct.

@spadgett
Copy link
Member

Oops, my code comment got lost.

The problem is that openshift-operators is only used for OpenShift, not native k8s. In the subscribe form, we look for an OperatorGroup named global-operators to find the global namespace. I'm not sure if there's an easy way to determine this just looking at the Subscription resource.

@shawn-hurley Do you know?

@@ -58,6 +58,15 @@ export const UninstallOperatorModal = withHandlePromise((props: UninstallOperato
.catch(_.noop);
};

const uninstallMsg =
props.subscription.metadata.namespace === 'openshift-operators' ? (
'all the installed namespaces'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'all the installed namespaces'
'all namespaces'

We might want to bold this text or make it stronger somehow.

'all the installed namespaces'
) : (
<>
<i>{props.subscription.metadata.namespace}</i> namespace
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<i>{props.subscription.metadata.namespace}</i> namespace
the <i>{props.subscription.metadata.namespace}</i> namespace

@spadgett
Copy link
Member

cc @itsptk

@itsptk
Copy link

itsptk commented Jan 31, 2020

FYI @dmesser

@spadgett
Copy link
Member

spadgett commented Feb 3, 2020

@itsptk Unrelated to this change, but does PF4 have a pattern for deletion dialogs? I think we might be mixing PF4 and PF3 styles here. Repeating "Uninstall...?" in large text looks a little odd to me.

cc @sg00dwin

@shawn-hurley
Copy link

I'm not sure if there's an easy way to determine this just looking at the Subscription resource.

I think the only way to tell, would be to get the OperatorGroup for the namespace of the subscription and determine if it is all namespaces or not. I believe that you could use the operatorgroup.status.namespaces to find that info.

@jhadvig
Copy link
Member Author

jhadvig commented Feb 3, 2020

@spadgett PR updated per our discussion

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

Thanks @jhadvig 👍

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

/retest

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

@spadgett
Copy link
Member

spadgett commented Feb 3, 2020

/lgtm cancel
need to run prettier

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2020
@jhadvig
Copy link
Member Author

jhadvig commented Feb 3, 2020

@spadgett updated

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, spadgett

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

@itsptk
Copy link

itsptk commented Feb 3, 2020

@jhadvig @spadgett I think there will be a concerted effort to make all the delete modals to be more like the PF4 standard in the future, but for now I'd say to make this one more similar to other delete modals in the console, let's drop the question mark on the first title. So just: Uninstall Operator

https://www.patternfly.org/v4/design-guidelines/usage-and-behavior/modal

@openshift-merge-robot openshift-merge-robot merged commit ec3d4e9 into openshift:master Feb 4, 2020
@openshift-ci-robot
Copy link
Contributor

@jhadvig: All pull requests linked via external trackers have merged. Bugzilla bug 1793893 has been moved to the MODIFIED state.

In response to this:

Bug 1793893: Make clear what uninstalling an operator that works for all namespaces does

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 spadgett added this to the v4.4 milestone Feb 4, 2020
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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/olm Related to OLM lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants