Skip to content

OCPBUGS-82473, CONSOLE-4512: Switch from legacy render to createRoot - #16202

Merged
openshift-merge-bot[bot] merged 12 commits into
openshift:mainfrom
logonoff:CONSOLE-4512-createRoot
Apr 11, 2026
Merged

OCPBUGS-82473, CONSOLE-4512: Switch from legacy render to createRoot#16202
openshift-merge-bot[bot] merged 12 commits into
openshift:mainfrom
logonoff:CONSOLE-4512-createRoot

Conversation

@logonoff

@logonoff logonoff commented Mar 26, 2026

Copy link
Copy Markdown
Member

This PR concludes the React 18 upgrade by switching the render function from the deprecated render to the concurrent createRoot. This affects all code rendered by React in Console, including all dynamic plugins.

This switch revealed several issues for us, several commits in this PR aim to address shortcomings in our React code revealed by createRoot.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added keyboard-accessible region landmarks to page content for improved navigation support.
  • Bug Fixes

    • Improved perspective detection reliability for consistent developer perspective initialization.
    • Enhanced test synchronization to reduce flaky test behaviors.
  • Tests

    • Marked several integration tests as broken due to concurrent rendering compatibility issues (to be addressed separately).
    • Updated test infrastructure with improved navigation helpers and selector robustness.
  • Refactor

    • Migrated core rendering to React 18 createRoot API.
    • Optimized state management patterns across multiple components using effect hooks.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 26, 2026
@openshift-ci-robot

openshift-ci-robot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

@logonoff: This pull request references CONSOLE-4512 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 26, 2026
@openshift-ci
openshift-ci Bot requested review from rawagner and spadgett March 26, 2026 13:20
@openshift-ci openshift-ci Bot added component/core Related to console core functionality component/dashboard Related to dashboard approved Indicates a PR has been approved by an approver from all required OWNERS files. component/shared Related to console-shared kind/cypress Related to Cypress e2e integration testing labels Mar 26, 2026
@logonoff

Copy link
Copy Markdown
Member Author

/label px-approved
/label docs-approved

@openshift-ci openshift-ci Bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels Mar 27, 2026

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

Claude coded my way though the cypress failing tests. PTAL

Comment thread frontend/packages/integration-tests-cypress/views/secret.ts Outdated
@logonoff
logonoff force-pushed the CONSOLE-4512-createRoot branch 3 times, most recently from 032c399 to c342860 Compare March 28, 2026 10:57
@openshift-ci-robot

openshift-ci-robot commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

@logonoff: This pull request references CONSOLE-4512 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

This PR concludes the React 18 upgrade by switching the render function from the deprecated render to the concurrent createRoot. This affects all code rendered by React in Console, including all dynamic plugins.

This switch revealed several issues for us, several commits in this PR aim to address shortcomings in our React code revealed by createRoot.

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
logonoff force-pushed the CONSOLE-4512-createRoot branch 2 times, most recently from d27c60a to 14be8c2 Compare March 31, 2026 14:12
@openshift-ci openshift-ci Bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 31, 2026
@logonoff
logonoff force-pushed the CONSOLE-4512-createRoot branch 3 times, most recently from 4eadceb to 4354ae3 Compare April 2, 2026 03:01
@openshift-ci openshift-ci Bot added the component/dev-console Related to dev-console label Apr 2, 2026
@logonoff
logonoff force-pushed the CONSOLE-4512-createRoot branch 2 times, most recently from 299f66a to 4cce42b Compare April 7, 2026 15:27
@openshift-ci openshift-ci Bot added the component/helm Related to helm-plugin label Apr 7, 2026
@logonoff
logonoff force-pushed the CONSOLE-4512-createRoot branch 2 times, most recently from 39cc9ba to 51de883 Compare April 7, 2026 18:56
@jhadvig

jhadvig commented Apr 10, 2026

Copy link
Copy Markdown
Member
deletes the resource instance: Kubernetes resource CRUD operations Role deletes the resource instance 

@logonoff

Copy link
Copy Markdown
Member Author

/retest

@logonoff

logonoff commented Apr 10, 2026

Copy link
Copy Markdown
Member Author

/verified by @logonoff

the following scenarios have been run to cover skipped tests:

  • locally: the following tests have passed (at least once): add-flow-ci, helm-release, topology-ci
  • on a cluster: installed web terminal operator, installed operators page and operator details page works on first glance
    • minor issue with navigation buttons in operator details page tab list appearing for a split second, then animating away - this appears to be a pre-existing issue that was only made more obvious because PatternFly tab microanimations work
    • web terminal works as expected - timeout dropdown, xterm, terminal connection closed and reconnect, restore/minimize
  • on a cluster: used import from git form through +Add to create a serverless deployment from a container image and it appears to work fine - i am able to access the deployed container

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 10, 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

the following scenarios have been run to cover skipped tests:

  • locally: the following tests have passed (at least once): add-flow-ci, helm-release, topology-ci
  • on a cluster: installed web terminal operator, installed operators page and operator details page works on first glance
  • minor issue with navigation buttons in operator details page tab list appearing for a split second, then animating away - this appears to be a pre-existing issue that was only made more obvious because PatternFly tab microanimations work
  • web terminal works as expected - timeout dropdown, xterm, terminal connection closed and reconnect, restore/minimize
  • on a cluster: used import from git from through +Add to create a serverless deployment from a container image and it appears to work fine - i am able to access the deployed container

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.

const navigateRef = useRef(navigate);
navigateRef.current = navigate;
const lastNamespaceRef = useRef(lastNamespace);
lastNamespaceRef.current = lastNamespace;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In future we may consider improving this code to avoid having both

const [activeNamespace, setActiveNamespace] = useState<string>(urlNamespace);

and

const activeNamespaceRef = useRef(activeNamespace);

We currently need the ref to avoid overriding react-hooks/exhaustive-deps rule, if I understand it correctly.

.contains(path[0])
.click(); // open top, expandable menu
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); // wait for animation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a way to disable PatternFly visual animations for the purpose of e2e test runs?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There should be some built in cypress way to wait for animations but I need to figure out why it's not working now

And user will see "Samples" option
And user will see Import YAML, Upload JAR file under From Local Machine section

# Disabled due to createRoot concurrent rendering failures (OCPBUGS-82505)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should create an issue to handle disabled e2e test scenarios in future.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

All disabled e2e scenarios have a related OCPBUGS to reneable them

@vojtechszocs

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2026
@jhadvig

jhadvig commented Apr 10, 2026

Copy link
Copy Markdown
Member

/retest

1 similar comment
@logonoff

Copy link
Copy Markdown
Member Author

/retest

Temporarily disable several flaky integration tests that fail with createRoot concurrent rendering errors. Added @broken-test tag to multiple feature files and converted affected Cypress suites to xdescribe to skip them in CI. Files affected span dev-console, helm-plugin, knative-plugin, topology, webterminal-plugin, operator-lifecycle-manager, and cluster-settings tests (OCPBUGS-82504 through OCPBUGS-82513).
@logonoff
logonoff force-pushed the CONSOLE-4512-createRoot branch from 88ff6bb to c18637a Compare April 10, 2026 23:28
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Apr 10, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2026
@logonoff

Copy link
Copy Markdown
Member Author

disabled the entire suite in hopes of less flaky ci

/verified by @logonoff

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

Details

In response to this:

disabled the entire suite in hopes of less flaky ci

/verified by @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-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 10, 2026
@Leo6Leo

Leo6Leo commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 11, 2026
@openshift-ci

openshift-ci Bot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Leo6Leo, logonoff, vojtechszocs

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-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD fb24786 and 2 for PR HEAD c18637a in total

@logonoff

Copy link
Copy Markdown
Member Author

/test all

@openshift-ci

openshift-ci Bot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

@logonoff: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 982f7c1 into openshift:main Apr 11, 2026
8 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@logonoff: Jira Issue Verification Checks: Jira Issue OCPBUGS-82473
✔️ 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-82473 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 PR concludes the React 18 upgrade by switching the render function from the deprecated render to the concurrent createRoot. This affects all code rendered by React in Console, including all dynamic plugins.

This switch revealed several issues for us, several commits in this PR aim to address shortcomings in our React code revealed by createRoot.

Summary by CodeRabbit

Release Notes

  • New Features

  • Added keyboard-accessible region landmarks to page content for improved navigation support.

  • Bug Fixes

  • Improved perspective detection reliability for consistent developer perspective initialization.

  • Enhanced test synchronization to reduce flaky test behaviors.

  • Tests

  • Marked several integration tests as broken due to concurrent rendering compatibility issues (to be addressed separately).

  • Updated test infrastructure with improved navigation helpers and selector robustness.

  • Refactor

  • Migrated core rendering to React 18 createRoot API.

  • Optimized state management patterns across multiple components using effect hooks.

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
logonoff deleted the CONSOLE-4512-createRoot branch April 11, 2026 15:23
@openshift-merge-robot

Copy link
Copy Markdown
Contributor

Fix included in release 4.22.0-0.nightly-2026-04-12-005049

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/core Related to console core functionality component/dashboard Related to dashboard component/dev-console Related to dev-console component/helm Related to helm-plugin component/knative Related to knative-plugin component/olm Related to OLM component/shared Related to console-shared component/topology Related to topology docs-approved Signifies that Docs has signed off on this PR 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. kind/cypress Related to Cypress e2e integration testing lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants