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 1833449: Show better messaging when releses are not found #5365

Merged
merged 1 commit into from
May 20, 2020

Conversation

jeff-phillips-18
Copy link
Member

@jeff-phillips-18 jeff-phillips-18 commented May 8, 2020

Fixes:
https://issues.redhat.com/browse/ODC-3125

Analysis / Root cause:
Simple message of Not Found was shown when there are no releases

Solution Description:
If there are no secrets, do not fetch the helm releases. Update helm releases when the number of secrets changes (to retrieve any changes to the helm releases list).
If there are no helm releases display an empty state informing the user that there are no installed helm releases and provide a link to the developer catalog to create one if desired.

Screen shots / Gifs for design review:
image

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

cc @openshift/team-devconsole-ux @serenamarie125 @beaumorley

/kind bug

@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. 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 8, 2020
@openshift-ci-robot
Copy link
Contributor

@jeff-phillips-18: This pull request references Bugzilla bug 1833449, 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.

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 ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1833449: Show better messaging when releses are not found

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.

Copy link
Contributor

@serenamarie125 serenamarie125 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! Thanks for addressing this so quickly @jeff-phillips-18

@christianvogt
Copy link
Contributor

/assign @rohitkrai03

</EmptyState>
) : (
<Firehose resources={resources}>
<HelmReleaseList namespace={namespace} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not send helmReleases as a prop to HelmReleaseList and use that to render the list? Right now the page is making multiple calls to the helm release list API which is not needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

The HelmReleaseList fetches the releases whenever the secrets change since the releases are not watchable. We could potentially use the first list of releases but would still need fetching to be done by the HelmReleaseList.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, I guess we could do something like sending the fetchCustomResources callback from HelmReleaseListPage to CustomResourceList and change the callback based on changes in secret but that would be out of scope for this bug fix. I think it's okay to have an extra API call for now.

Copy link
Contributor

@rohitkrai03 rohitkrai03 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 lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 11, 2020
@jeff-phillips-18
Copy link
Member Author

/hold Verifying updates on first release added

@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 11, 2020
@rohitkrai03
Copy link
Contributor

Ohh right, this would not update the page if the page is in empty state and first release is added.

/lgtm cancel
/approve cancel

@openshift-ci-robot openshift-ci-robot removed lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 11, 2020
@jeff-phillips-18
Copy link
Member Author

/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 11, 2020
@jeff-phillips-18
Copy link
Member Author

Updated to fetch secrets first and only fetch helm releases if there are secrets and if the number of secrets change (as we do in topology).

@openshift-ci-robot
Copy link
Contributor

@jeff-phillips-18: This pull request references Bugzilla bug 1833449, which is valid.

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 1833449: Show better messaging when releses are not found

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.

);
const installURL = { pathname: `/catalog/ns/${namespace}`, search: '?kind=%5B"HelmChart"%5D' };
return (
<EmptyState variant={EmptyStateVariant.full}>
Copy link
Contributor

Choose a reason for hiding this comment

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

We can move the logic of showing EmptyState to CustomResourceList and make it generic so that other list pages using it would get the same functionality. We can pass emptyState: React.ReactNode prop to the list component and it shows that based on the fetched resources. Everything else should work fine since it already re-fetches resources based on the dependantResource which is secrets in this case. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

The CustomResourceList does not take a FirehoseResult as a dependantResource (the other usage does not use one). If it did we could handle the loading state and empty states much better. I tried doing it that way but there are race conditions with the loading state. Only other thing to do would be to pass the loading state onto the CustomResourceList and that seemed to be too much delta and defeats the purpose of the common component.

Copy link
Member Author

Choose a reason for hiding this comment

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

@rohitkrai03 OK, I revisited and updated to continue to use CustomResourceList. Added parameters for an EmptyMsg and loaded flag.

@jeff-phillips-18 jeff-phillips-18 force-pushed the empty-helm branch 5 times, most recently from 06a1c7e to 733305c Compare May 12, 2020 18:39
@rohitkrai03
Copy link
Contributor

@jeff-phillips-18 I am still seeing the empty state on the list page while reloading and its getting stuck in the empty state mode.

@jeff-phillips-18
Copy link
Member Author

Firehose has some issues on a page reload occurring during a fetch for optional resources. Updated to use the useK8sWatchResource hook instead. @rohitkrai03 PTAL.

@jeff-phillips-18
Copy link
Member Author

/retest

Copy link
Contributor

@rohitkrai03 rohitkrai03 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Verified locally. Works great. Thanks for doing this @jeff-phillips-18 :)

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jeff-phillips-18, rohitkrai03, serenamarie125

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-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 19, 2020
@openshift-bot
Copy link
Contributor

/retest

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

14 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.

@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.

@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.

@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.

@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.

@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.

@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.

@openshift-merge-robot openshift-merge-robot merged commit 05509e7 into openshift:master May 20, 2020
@openshift-ci-robot
Copy link
Contributor

@jeff-phillips-18: All pull requests linked via external trackers have merged: openshift/console#5365. Bugzilla bug 1833449 has been moved to the MODIFIED state.

In response to this:

Bug 1833449: Show better messaging when releses are not found

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.5 milestone May 22, 2020
@jeff-phillips-18 jeff-phillips-18 deleted the empty-helm branch December 2, 2020 13:35
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. component/dev-console Related to dev-console kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants