Skip to content

[release-5.0] OCPBUGS-133830: Fix events page rendering as 0px-tall list - #17438

Merged
openshift-merge-bot[bot] merged 6 commits into
openshift:release-5.0from
openshift-cherrypick-robot:cherry-pick-17417-to-release-5.0
Oct 27, 2026
Merged

openshift-merge-bot[bot] merged 6 commits into
openshift:release-5.0from
openshift-cherrypick-robot:cherry-pick-17417-to-release-5.0

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #17417

/assign logonoff

The events page showed only "Older events are not stored." because the
virtualized list collapsed to 0px tall. react-virtualized was bumped
from 9.x to ^9.22.6 in e139d7c (CONSOLE-5065), and 9.22.6 removed
CellMeasurer's findDOMNode fallback. CellMeasurer now cloneElements the
element returned by its render prop and attaches a ref to measure it,
so that element must be a DOM node or forward one.

SysEvent was a class component, so the cloned ref held the class
instance instead of a DOM node. CellMeasurer's _getCellMeasurements
failed its instanceof HTMLElement check and returned {height: 0,
width: 0} for every row, stacking all rows at top: 0 with height 0 and
collapsing the container. Other CellMeasurer consumers were unaffected
because TableRow is a forwardRef and virtualized-grid/Cell.tsx renders
a plain div.

Convert SysEvent to a forwardRef function component that forwards the
ref to its wrapper div, replace shouldComponentUpdate with memo and a
custom comparator preserving the same logic, and move the
componentWillUnmount cleanup of the seen animation set into a
useEffect. Drop the dead onLoad/onEntered props from the render-prop
usage.

Add a regression test that stubs jsdom geometry (offsetHeight,
offsetWidth, getBoundingClientRect all report 0) and asserts the inner
scroll container height equals rows times row height, which stays at 0
with the class-component pattern.

Assisted-by: glm-5-3
…ging ref

CellMeasurer creates a new callback ref on each render, and React only
takes the memo bailout when the ref is also unchanged
(compare(prevProps, nextProps) && current.ref === workInProgress.ref in
updateMemoComponent). With memo wrapping the ref-forwarding SysEvent,
every streaming update re-rendered all visible rows even when
arePropsEqual returned true, losing the shouldComponentUpdate behavior
of the original class component.

Move the memo inside a thin ref-forwarding wrapper: SysEvent forwards
the ref to its wrapper div and keeps the animation logic and cleanup,
while the memoized SysEventContent renders the event row and never
receives a ref, so the memo bailout holds.

Add a test that rerenders with the same events array (so the
measurement cache is not cleared and row styles are unchanged) and
asserts the row content does not re-render.

Assisted-by: glm-5-3
SysEvent mutated the seen set during render and recomputed
shouldAnimate from it on every pass, so a rerender dropped
co-sysevent-slide-in mid-animation. The restructure in 7a8a5bb
made this visible: CellMeasurer recreates its callback ref each
render, so SysEvent rerenders on every pass instead of being shielded
by the old shouldComponentUpdate. Mutating seen during render is also
impure — a discarded concurrent render would mark an event seen.

Decide once per mount with a useState initializer that only reads the
seen set, and record the UID in an effect after commit. The index < 6
eligibility condition is unchanged. Add a test asserting a rerender
keeps the slide-in class on an animating row; it fails against the
previous render-time mutation.

Assisted-by: glm-5-3
…ndices

The virtualized event list keys rows by index, so when a new event
streams in (events sort newest-first), the row at an existing index
stays mounted and receives a new event prop. Two bugs followed from
that:

- SysEventContent's memo comparator only compared lastTimestamp, so a
  distinct event with an identical timestamp taking over an index kept
  rendering the previous event's content.
- shouldAnimate is computed once per mount via useState, so a new event
  at a reused index inherited the previous event's animation decision:
  the slide-in class persisted on the same DOM node and the CSS
  animation never replayed for the new event.

Key SysEvent by event UID (inside the render prop, distinct from the
index-keyed CellMeasurer) so a different event remounts the row and
recomputes animation eligibility, and compare the UID in the memo
comparator so replacement events always rerender.

Also track every mounted UID in the seen set, not just animated ones.
With per-UID remounting, a UID that shifts indices would otherwise be
deleted by its old row's cleanup and never re-added by its new mount
(shouldAnimate=false), re-animating on the next shift.

Assisted-by: glm-5-3
Combined events (events.k8s.io series) update series.count and
series.lastObservedTime while their lastTimestamp stays unchanged, so
the SysEventContent memo comparator bailed out and rows kept showing a
stale occurrence count.

Compare series.count and series.lastObservedTime in arePropsEqual so
series updates rerender the row content.

Assisted-by: glm-5-3
The row content memo compared series.count/lastObservedTime for
combined events.k8s.io events but not the deprecated count field that
core/v1 events use. The event component renders
series ? series.count : event.count, so a core/v1 event combining
into a higher count with an unchanged lastTimestamp kept showing the
stale count.

Add event.count to the comparator, with a test that updates only a
count field and asserts only that row's content rerenders.

Assisted-by: glm-5-3
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration.

Use /test ? to list jobs and /pipeline help for commands.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: f377b94a-bae3-49b2-8e14-458cc781c616

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: Jira Issue OCPBUGS-132821 has been cloned as Jira Issue OCPBUGS-133830. Will retitle bug to link to clone.
/retitle [release-5.0] OCPBUGS-133830: Fix events page rendering as 0px-tall list

Details

In response to this:

This is an automated cherry-pick of #17417

/assign logonoff

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot changed the title [release-5.0] OCPBUGS-132821: Fix events page rendering as 0px-tall list [release-5.0] OCPBUGS-133830: Fix events page rendering as 0px-tall list Oct 27, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Oct 27, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-133830, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-132821 is in the state MODIFIED, which is one of the valid states (MODIFIED, ON_QA, VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-132821 targets the "5.1.0" version, which is one of the valid target versions: 5.1.0
  • bug has dependents

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is an automated cherry-pick of #17417

/assign logonoff

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the component/core Related to console core functionality label Oct 27, 2026

@logonoff logonoff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm
/label backport-ridk-assessed

@openshift-ci

openshift-ci Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@logonoff: The label(s) /label backport-ridk-assessed cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, ux-approved, no-qe, rebase/manual, cluster-config-api-changed, run-integration-tests, verified, ready-for-human-review, reliability, hotfix, do-not-merge/needs-hotfix-approval, do-not-merge/version-blocked, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, ci/severity-critical, jira/skip-dependent-bug-check, jira/valid-bug, ok-to-test, plugin-api-approved, plugin-api-changed, stability-fix-approved, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

Details

In response to this:

/lgtm
/label backport-ridk-assessed

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-sigs/prow repository.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 27, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-gcp-console
/test e2e-gcp-console-techpreview

@openshift-ci

openshift-ci Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, openshift-cherrypick-robot

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 openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 27, 2026
@logonoff

Copy link
Copy Markdown
Member

/label backport-risk-assessed
/label tide/merge-method-squash

@openshift-ci openshift-ci Bot added backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. labels Oct 27, 2026
@logonoff

Copy link
Copy Markdown
Member

/verified by @logonoff

image

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Oct 27, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@logonoff: This PR has been marked as verified by @logonoff.

Details

In response to this:

/verified by @logonoff

image

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 openshift-eng/jira-lifecycle-plugin repository.

@logonoff

Copy link
Copy Markdown
Member

e2e failure isn't related to events page
/override ci/prow/e2e-gcp-console

@openshift-ci

openshift-ci Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@logonoff: Overrode contexts on behalf of logonoff: ci/prow/e2e-gcp-console

Details

In response to this:

e2e failure isn't related to events page
/override ci/prow/e2e-gcp-console

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-sigs/prow repository.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 6ebef74 into openshift:release-5.0 Oct 27, 2026
10 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: Jira Issue Verification Checks: Jira Issue OCPBUGS-133830
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-133830 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

This is an automated cherry-pick of #17417

/assign logonoff

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 openshift-eng/jira-lifecycle-plugin repository.

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. component/core Related to console core functionality jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants