-
Notifications
You must be signed in to change notification settings - Fork 667
Topology: Only retrieve events when showing the monitoring tab #4640
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
Topology: Only retrieve events when showing the monitoring tab #4640
Conversation
There was a problem hiding this comment.
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}
There was a problem hiding this comment.
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
d7c27fe to
b2445e0
Compare
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
|
@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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes , got it.
b2445e0 to
f9c2df0
Compare
|
/retest |
rohitkrai03
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray ;
| <MonitoringOverviewWrapper item={item} />; | |
| <MonitoringOverviewWrapper item={item} /> |
f9c2df0 to
0f0dcd3
Compare
|
/lgtm Verified locally working as expected
|
|
/hold |
0f0dcd3 to
e46b3c0
Compare
|
@christianvogt I believe we have come to consensus and we will show events from the pods as well as from the resource. |
|
/hold cancel |
|
/lgtm |
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |

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:

Unit test coverage report:

Browser conformance:
/kind bug
cc @openshift/team-devconsole-ux