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 1798858: Fix bug where installed operators list status is missin… #4270

Merged
merged 1 commit into from Feb 14, 2020

Conversation

rhamilto
Copy link
Member

@rhamilto rhamilto commented Feb 10, 2020

…g or incorrect

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1798858

Before:
Status shows status.reason in lieu of status.phase, thus resulting in the bug.
74158616-63f94d80-4be8-11ea-9f31-aa5bf6f6b4da copy

After:
Status now shows status.phase, which aligns it with ClusterServiceVersion Overview status and fixes bug where SubscriptionTableRow Status appeared in the Deployment column. As a result of this change, there is no longer an indicator the operator has been copied (i.e., there is no longer a status of Copied as that was coming from status.reason). IMO, we should explore an alternate and more obvious way to indicate an operator has been copied without repurposing Status.
kNV9g6pyZt copy

@rhamilto rhamilto added the kind/bug Categorizes issue or PR as related to a bug. label Feb 10, 2020
@rhamilto rhamilto added this to the v4.4 milestone Feb 10, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 10, 2020
@openshift-ci-robot
Copy link
Contributor

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

[WIP] Bug 1798858: Fix bug where installed operators list status is missin…

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. labels Feb 10, 2020
@rhamilto
Copy link
Member Author

@tlwu2013 or @alecmerdler, can you provide insight as to why the table status was showing status.reason and not status.phase?

@openshift-ci-robot openshift-ci-robot added component/olm Related to OLM component/shared Related to console-shared labels Feb 10, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 10, 2020
@rhamilto
Copy link
Member Author

/retest

@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Bugzilla bug 1798858, which is valid.

In response to this:

[WIP] Bug 1798858: Fix bug where installed operators list status is missin…

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
Copy link
Contributor

@rhamilto: This pull request references Bugzilla bug 1798858, which is valid.

In response to this:

[WIP] Bug 1798858: Fix bug where installed operators list status is missin…

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.

@rhamilto
Copy link
Member Author

/retest

2 similar comments
@rhamilto
Copy link
Member Author

/retest

@rhamilto
Copy link
Member Author

/retest

@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Bugzilla bug 1798858, which is valid.

In response to this:

[WIP] Bug 1798858: Fix bug where installed operators list status is missin…

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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 12, 2020
@@ -184,11 +172,15 @@ const ClusterServiceVersionStatus: React.FC<ClusterServiceVersionStatusProps> =
obj,
subscription,
}) => {
const statusString = _.get(obj, 'status.reason', ClusterServiceVersionPhase.CSVPhaseUnknown);
const showSuccessIcon = statusString === 'Copied' || statusString === 'InstallSucceeded';
const status = _.get(obj, 'status.phase');
Copy link
Member Author

@rhamilto rhamilto Feb 12, 2020

Choose a reason for hiding this comment

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

The CLI does not use a default value (if status.phase does not exist, nothing is shown).

@@ -363,14 +342,14 @@ export const FailedSubscriptionTableRow: React.FC<FailedSubscriptionTableRowProp
<ResourceLink kind="Namespace" title={namespace} name={namespace} />
</TableData>

{/* Status */}
Copy link
Member Author

Choose a reason for hiding this comment

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

This was overlooked in #3712.

@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Bugzilla bug 1798858, which is valid.

In response to this:

[WIP] Bug 1798858: Fix bug where installed operators list status is missin…

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
Copy link
Contributor

@rhamilto: This pull request references Bugzilla bug 1798858, which is valid.

In response to this:

[WIP] Bug 1798858: Fix bug where installed operators list status is missin…

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.

@rhamilto rhamilto changed the title [WIP] Bug 1798858: Fix bug where installed operators list status is missin… Bug 1798858: Fix bug where installed operators list status is missin… Feb 13, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 13, 2020
@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Bugzilla bug 1798858, which is valid.

In response to this:

Bug 1798858: Fix bug where installed operators list status is missin…

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.

@rhamilto
Copy link
Member Author

@benjaminapetersen, @TheRealJon this is ready for review.

@tlwu2013
Copy link
Contributor

tlwu2013 commented Feb 13, 2020

can you provide insight as to why the table status was showing status.reason and not status.phase?

Hi @rhamilto , I'll share some background/history here.

Like you pointed out, "Installed Operators list view" uses status.reason for showing if the CSV is:
a). created in the same namespace as where the Operator (deployment, subscription, etc) being installed (i.e. InstallSucceeded), or
b). a Copied one (by OLM) to a particular namespace for exposing provided APIs since regular users don't have the access to the namespace where the Operator being installed.

This only happens when an Operator is installed as a "global Operator" (made available to all namespaces) and would be installed in "openshift-operators" namespace. In this case, only the CSV in "openshift-operators" namespace is the one being installed by the OLM (as InstallSucceeded), and the CSVs in the rest of the namespaces are those being Copied.

In the past, UI needs this clear differentiation because:
a). users can only "Uninstall Operator" (through "Remove Operator Subscription") when picking up the namespace where the Operator Subscription object exists (i.e. "openshift-operators" namespace).
b). folks prefer to have a UI exposes info/status that is more aligned to how the underlying API works.

Given that:
a). now from the UI, users can "Uninstall Operator" ("Remove or Edit Subscription") even from a "Copied CSV" in any namespaces (not necessarily have to be the same namespace as where the Subscription object lives).
b). the new OLM API will be gradually moving away from this "Copied CSV" behavior.

I feel it should be okay if we free up this CSV status distinction and replace status.reason with status.phase on the list view as well.

Wondering what other people's thoughts about this?
@alecmerdler , @dmesser , @alimobrem , @robszumski , @itsptk

@rhamilto
Copy link
Member Author

Thanks, @tlwu2013! The background is very helpful.

@itsptk
Copy link

itsptk commented Feb 14, 2020

This makes sense to me.

I just want to include a link to #3755 (comment) in which the operator status was added to the status cards in dashboards, and at the time we agreed that status.phase should be used there (to match the details view they would see if they clicked an operator) and that we should revisit the list view in the future, which is what this bug is accomplishing.

FYI @andybraren

Copy link
Member

@TheRealJon TheRealJon 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 14, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 977ce60 into openshift:master Feb 14, 2020
@openshift-ci-robot
Copy link
Contributor

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

In response to this:

Bug 1798858: Fix bug where installed operators list status is missin…

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.

@rhamilto rhamilto deleted the bz1798858 branch February 14, 2020 18:40
@rhamilto
Copy link
Member Author

/cherry-pick release-4.3

@openshift-cherrypick-robot

@rhamilto: #4270 failed to apply on top of branch "release-4.3":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	frontend/packages/console-shared/src/components/status/Status.tsx
M	frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx
Falling back to patching base and 3-way merge...
Auto-merging frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx
CONFLICT (content): Merge conflict in frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx
Auto-merging frontend/packages/console-shared/src/components/status/Status.tsx
CONFLICT (content): Merge conflict in frontend/packages/console-shared/src/components/status/Status.tsx
Patch failed at 0001 Bug 1798858: Fix bug where installed operators list status is missing or incorrect

In response to this:

/cherry-pick release-4.3

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.

return <ErrorStatus {...statusProps}>{children}</ErrorStatus>;

case 'Accepted':
case 'Active':
case 'Bound':
case 'Complete':
case 'Completed':
case 'Copied':
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not needed as this is a status.reason status.

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 component/shared Related to console-shared kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants