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 1881356: fixes add page notification if dynamic channel/sources or broker exists #6703

Conversation

invincibleJai
Copy link
Member

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

Analysis / Root cause:
On add page notification is Shown "No workloads found" even if nameSpace has EventSource, Channel, Broker

Solution Description:
Add check for dynamic Sources/Channels/Brokers if they exists

Screen shots / Gifs for design review:
Sep-22-2020 14-28-15

Unit test coverage report:
image

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. label Sep 22, 2020
@openshift-ci-robot
Copy link
Contributor

@invincibleJai: This pull request references Bugzilla bug 1881356, 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.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1881356: fixes add page notification if dynamic channel/sources or broker exists

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 the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Sep 22, 2020
@openshift-ci-robot openshift-ci-robot added component/dev-console Related to dev-console component/knative Related to knative-plugin approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 22, 2020
@@ -44,12 +53,22 @@ const EmptyStateLoader: React.FC<EmptyStateLoaderProps> = ({ resources, loaded,
_.isEmpty(deploymentConfigs) &&
_.isEmpty(deployments) &&
_.isEmpty(statefulSets) &&
_.isEmpty(knativeService),
_.isEmpty(knativeService) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
_.isEmpty(knativeService) &&
_.isEmpty(knativeServices) &&

});

it('should not return limit if not passed to getDynamicChannelResourceList', async () => {
await fetchChannelsCrd();
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move this to beforeEach instead of having it in all the cases, WDYT?

daemonSets?: K8sResourceKind;
statefulSets?: K8sResourceKind;
knativeService?: K8sResourceKind;
[x: string]: K8sResourceKind & { data?: K8sResourceKind[] };
}
interface EmptyStateLoaderProps {
resources?: ResourcesType;
Copy link
Contributor

Choose a reason for hiding this comment

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

how about using the below type and remove the ResourceType altogether?

Suggested change
resources?: ResourcesType;
resources?: TopologyDataResources;

Comment on lines 211 to 213
resources:
| TopologyDataResources
| { [key: string]: K8sResourceKind & { data?: K8sResourceKind[] } },
Copy link
Contributor

Choose a reason for hiding this comment

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

wrt to my previous comment on having TopologyDataResources type in AddPage, we can revert this changes.

@invincibleJai invincibleJai force-pushed the fix-add-notification-dynamic-sources branch from 1921e3c to ad48cf4 Compare September 22, 2020 11:07
Copy link
Contributor

@karthikjeeyar karthikjeeyar left a comment

Choose a reason for hiding this comment

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

Tested locally, works fine
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: invincibleJai, karthikjeeyar

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 867c3f1 into openshift:master Sep 22, 2020
@openshift-ci-robot
Copy link
Contributor

@invincibleJai: All pull requests linked via external trackers have merged:

Bugzilla bug 1881356 has been moved to the MODIFIED state.

In response to this:

Bug 1881356: fixes add page notification if dynamic channel/sources or broker exists

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.6 milestone Sep 30, 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/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. 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 component/knative Related to knative-plugin lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants