Skip to content

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

Merged
openshift-merge-bot[bot] merged 7 commits into
openshift:release-4.22from
redhat-chai-bot:cherry-pick-16949-to-release-4.22
Aug 21, 2026
Merged

[release-4.22] OCPBUGS-112290: Flush async feature flag updates immediately#17075
openshift-merge-bot[bot] merged 7 commits into
openshift:release-4.22from
redhat-chai-bot:cherry-pick-16949-to-release-4.22

Conversation

@redhat-chai-bot

Copy link
Copy Markdown

Cherry-pick of #16949 to release-4.22 with a build fix — inlines createTestPluginStore in FeatureFlagExtensionLoader.spec.tsx because the original import path (pluginTestUtils) does not exist on the release-4.22 branch.

Supersedes #17051 (broken automatic cherry-pick).


AI-generated. Review for accuracy.

@logonoff requested in Slack thread

kchawlani19 and others added 7 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-robot openshift-ci-robot added 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 Aug 21, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: This pull request references Jira Issue OCPBUGS-112290, which is valid.

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 POST, 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

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

Details

In response to this:

Cherry-pick of #16949 to release-4.22 with a build fix — inlines createTestPluginStore in FeatureFlagExtensionLoader.spec.tsx because the original import path (pluginTestUtils) does not exist on the release-4.22 branch.

Supersedes #17051 (broken automatic cherry-pick).


AI-generated. Review for accuracy.

@logonoff requested in Slack thread

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

@logonoff

Copy link
Copy Markdown
Member

/verified by unit tests
/label backport-risk-assessed

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

Details

In response to this:

/verified by unit tests
/label backport-risk-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 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 Aug 21, 2026
@openshift-ci openshift-ci Bot added backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. lgtm Indicates that a PR is ready to be merged. labels Aug 21, 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

@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, redhat-chai-bot

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 Aug 21, 2026
@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
@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: 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 6fd62e5 into openshift:release-4.22 Aug 21, 2026
8 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: Jira Issue Verification Checks: Jira Issue OCPBUGS-112290
✔️ 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-112290 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:

Cherry-pick of #16949 to release-4.22 with a build fix — inlines createTestPluginStore in FeatureFlagExtensionLoader.spec.tsx because the original import path (pluginTestUtils) does not exist on the release-4.22 branch.

Supersedes #17051 (broken automatic cherry-pick).


AI-generated. Review for accuracy.

@logonoff requested in Slack thread

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

5 participants