Skip to content

Conversation

@jeff-phillips-18
Copy link
Member

@jeff-phillips-18 jeff-phillips-18 commented Mar 4, 2020

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

Analysis / Root cause:
Events are being retrieved when loading the topology view and topology is updated when events change. These events are not used unless the details panel is being shown with the monitoring tab selected.

Solution Description:
Do not retrieve events until the user opens the details page and selects the monitoring tab.
Show events from pods and the resource in the events lists.
Sort events chronologically

Screen shots / Gifs for design review:
image

Unit test coverage report:
image

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

/kind bug

cc @openshift/team-devconsole-ux

@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. component/dev-console Related to dev-console component/shared Related to console-shared labels Mar 4, 2020
Comment on lines 12 to 25
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 use a field selector to only fetch events related to specific resource.

Looking at events.jsx, this is what they are doing. They also don't use firehose. I'm not familiar enough with the history behind why it's done differently here.

involvedObject.uid=${uid},involvedObject.name=${name},involvedObject.kind=${kind}

Copy link
Member Author

Choose a reason for hiding this comment

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

Added the selector but stuck with Firehose

Copy link
Member

Choose a reason for hiding this comment

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

nit: can import import { PodModel } from '@console/internal/models'; and use PodModel.kind

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is kind equal to pod? shouldn't this be the kind of the object ?

Copy link
Member

Choose a reason for hiding this comment

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

i think it'll be pod as we are fetching events for pods irrespective of workloads i.e d,dc etc

Comment on lines 4 to 5
Copy link
Member

Choose a reason for hiding this comment

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

nit: can be above relative imports

Copy link
Contributor

Choose a reason for hiding this comment

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

Was this not picked up by the linter?

Copy link
Member Author

Choose a reason for hiding this comment

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

linter doesn't seem to care anymore

Copy link
Contributor

Choose a reason for hiding this comment

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

@christianvogt Linter seems to have issues for some time now... I think it was broken when we upgraded everything - It doesn't catch import order I don't think. Might just not catch @ import order.

@invincibleJai
Copy link
Member

@jeff-phillips-18 monitoring tab is shown now for knative service and revisions as well , am not sure if we need that , underlying they do have deployments and pods

Mar-05-2020 21-20-13

Copy link
Member

Choose a reason for hiding this comment

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

I think pods above was introduced in #3961 to fetch events for that pod , as we are fetching events now based on selector so we can remove this as well

Copy link
Member Author

Choose a reason for hiding this comment

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

we use pods in the objects in other places (donut and such). I don't believe they were introduced in that PR on changed to create the pods constant rather than inline.

Copy link
Member

Choose a reason for hiding this comment

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

Yes , got it.

@rohitkrai03
Copy link
Contributor

/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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2020
Comment on lines 12 to 25
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we agreed that the events in the monitoring tab should be the same events shown in the workloads events tab and not the individual pods associated with the workload.

cc @sspeiche @abhi-kn

Copy link
Contributor

Choose a reason for hiding this comment

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

stray ;

Suggested change
<MonitoringOverviewWrapper item={item} />;
<MonitoringOverviewWrapper item={item} />

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2020
@invincibleJai
Copy link
Member

/lgtm

Verified locally working as expected

  • can see Monitoring tabs only for workloads and events for associated workloads and not Pods

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

/hold
holding until we get agreement on whether to show events related to all pods and the workload, or just the workload itself.

@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 Mar 9, 2020
@openshift-ci-robot openshift-ci-robot removed lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 11, 2020
@openshift-ci-robot openshift-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 11, 2020
@jeff-phillips-18
Copy link
Member Author

@christianvogt I believe we have come to consensus and we will show events from the pods as well as from the resource.

@christianvogt
Copy link
Contributor

/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 Mar 11, 2020
@invincibleJai
Copy link
Member

/lgtm

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

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Mar 13, 2020
@openshift-bot
Copy link
Contributor

/retest

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

1 similar comment
@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 6905d8d into openshift:master Mar 13, 2020
@spadgett spadgett added this to the v4.5 milestone Mar 18, 2020
@jeff-phillips-18 jeff-phillips-18 deleted the monitoring-tab 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. component/dev-console Related to dev-console 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants