Skip to content

[release-4.22] OCPBUGS-112290: Flush async feature flag updates immediately - #17051

Closed
openshift-cherrypick-robot wants to merge 6 commits into
openshift:release-4.22from
openshift-cherrypick-robot:cherry-pick-16949-to-release-4.22
Closed

[release-4.22] OCPBUGS-112290: Flush async feature flag updates immediately#17051
openshift-cherrypick-robot wants to merge 6 commits into
openshift:release-4.22from
openshift-cherrypick-robot:cherry-pick-16949-to-release-4.22

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #16949

/assign logonoff

kchawlani19 and others added 6 commits August 20, 2026 02:30
Deferring all setFeatureFlag calls until the next render left
flag-gated plugin routes and nav items missing for ~10s after an
async console.flag/hookProvider resolved. Keep render-time updates
deferred, but dispatch async updates right away.

Fixes openshift#16922

Co-authored-by: Cursor <cursoragent@cursor.com>
Update flagsRef when dispatching so consecutive async setFeatureFlag
calls (e.g. true then false before Redux re-renders) are not skipped
against a stale selector snapshot. Strengthen unit coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Always dispatch pending setFeatureFlag updates instead of syncing a
local FLAGS snapshot. Flags are also set elsewhere and read via useFlag,
so a locally mutated copy can go stale. Immutable Map.set is already a
no-op when the value is unchanged.
Replace render-phase isRenderingRef tracking with a coalesced
queueMicrotask flush so child FeatureFlagExtensionHookResolver
re-renders cannot dispatch during render. Drop the stale flagsRef
comment and exercise the controller through renderHookWithProviders
against a real Redux store.
Unlock after taking the batch so reentrant setFeatureFlag during
dispatch can schedule a follow-up microtask. Use createTestPluginStore
in tests and cover the reentrant-update path.
createTestPluginStore passed into renderHookWithProviders is enough;
sibling console-app tests rely on the same pattern without mocking plugins.
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci
openshift-ci Bot requested review from Leo6Leo and jhadvig August 20, 2026 02:31
@openshift-ci openshift-ci Bot added the component/core Related to console core functionality label Aug 20, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: Jira Issue OCPBUGS-111707 has been cloned as Jira Issue OCPBUGS-112290. Will retitle bug to link to clone.
/retitle [release-4.22] OCPBUGS-112290: Flush async feature flag updates immediately

Details

In response to this:

This is an automated cherry-pick of #16949

/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-4.22] OCPBUGS-111707: Flush async feature flag updates immediately [release-4.22] OCPBUGS-112290: Flush async feature flag updates immediately Aug 20, 2026
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 20, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-112290, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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 #16949

/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.

@logonoff

Copy link
Copy Markdown
Member

/close

@openshift-ci openshift-ci Bot closed this Aug 20, 2026
@openshift-ci

openshift-ci Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

@logonoff: Closed this PR.

Details

In response to this:

/close

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-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-112290. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state.

Details

In response to this:

This is an automated cherry-pick of #16949

/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.

@logonoff

Copy link
Copy Markdown
Member

/reopen

@openshift-ci openshift-ci Bot reopened this Aug 21, 2026
@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@logonoff: Reopened this PR.

Details

In response to this:

/reopen

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-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-112290, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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 #16949

/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 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: openshift-cherrypick-robot
Once this PR has been reviewed and has the lgtm label, please ask for approval from logonoff. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@logonoff

Copy link
Copy Markdown
Member

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 21, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@logonoff: This pull request references Jira Issue OCPBUGS-112290, 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 (4.22.0) matches configured target version for branch (4.22.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-112291 is in the state Verified, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-112291 targets the "5.0.0" version, which is one of the valid target versions: 5.0.0
  • bug has dependents
Details

In response to this:

/jira refresh

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 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images c7827be link true /test images
ci/prow/analyze c7827be link true /test analyze
ci/prow/okd-scos-images c7827be link true /test okd-scos-images
ci/prow/frontend c7827be link true /test frontend

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.

@logonoff

Copy link
Copy Markdown
Member

/label tide/merge-method-squash

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 21, 2026
@logonoff

Copy link
Copy Markdown
Member

/close

succeeded by #17075

@openshift-ci openshift-ci Bot closed this Aug 21, 2026
@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@logonoff: Closed this PR.

Details

In response to this:

/close

succeeded by #17075

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-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-112290. The bug has been updated to no longer refer to the pull request using the external bug tracker.

Details

In response to this:

This is an automated cherry-pick of #16949

/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

component/core Related to console core functionality 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. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants